Display inventory content in statdisplay
This commit is contained in:
@ -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)
|
||||
|
||||
|
@ -15,9 +15,13 @@ class Player(FightingEntity):
|
||||
level: int = 1
|
||||
current_xp: int = 0
|
||||
max_xp: int = 10
|
||||
inventory: list = list()
|
||||
inventory: list
|
||||
paths: Dict[Tuple[int, int], Tuple[int, int]]
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.inventory = list()
|
||||
|
||||
def move(self, y: int, x: int) -> None:
|
||||
"""
|
||||
When the player moves, move the camera of the map.
|
||||
|
Reference in New Issue
Block a user