Display inventory content in statdisplay

This commit is contained in:
Yohann D'ANELLO
2020-11-11 23:41:06 +01:00
parent 12c653fe15
commit 21e85078a4
3 changed files with 16 additions and 5 deletions

View File

@ -13,8 +13,10 @@ class Item(Entity):
self.held = False
def drop(self, y: int, x: int) -> None:
self.held = False
self.held_by = None
if self.held:
self.held_by.inventory.remove(self)
self.held = False
self.held_by = None
self.map.add_entity(self)
self.move(y, x)