Use directly equipped items outside the inventory
This commit is contained in:
@ -29,7 +29,7 @@ class Item(Entity):
|
||||
The item is dropped from the inventory onto the floor
|
||||
"""
|
||||
if self.held:
|
||||
self.held_by.inventory.remove(self)
|
||||
self.held_by.remove_from_inventory(self)
|
||||
self.held_by.map.add_entity(self)
|
||||
self.move(self.held_by.y, self.held_by.x)
|
||||
self.held = False
|
||||
@ -46,8 +46,8 @@ class Item(Entity):
|
||||
"""
|
||||
if self.held_by.equipped_item:
|
||||
self.held_by.equipped_item.unequip()
|
||||
self.held_by.equipped_item = self
|
||||
self.held_by.remove_from_inventory(self)
|
||||
self.held_by.equipped_item = self
|
||||
|
||||
def unequip(self) -> None:
|
||||
"""
|
||||
|
Reference in New Issue
Block a user