Save equipped item and armor
This commit is contained in:
parent
1b4612afd0
commit
9475725228
|
@ -154,4 +154,8 @@ class Player(InventoryHolder, FightingEntity):
|
||||||
d = super().save_state()
|
d = super().save_state()
|
||||||
d["current_xp"] = self.current_xp
|
d["current_xp"] = self.current_xp
|
||||||
d["max_xp"] = self.max_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
|
return d
|
||||||
|
|
Loading…
Reference in New Issue