Save equipped item and armor

This commit is contained in:
Yohann D'ANELLO 2020-12-18 17:50:26 +01:00
parent 1b4612afd0
commit 9475725228

View File

@ -154,4 +154,8 @@ class Player(InventoryHolder, FightingEntity):
d = super().save_state()
d["current_xp"] = self.current_xp
d["max_xp"] = self.max_xp
d["equipped_item"] = self.equipped_item.save_state()\
if self.equipped_item else None
d["equipped_armor"] = self.equipped_armor.save_state()\
if self.equipped_armor else None
return d