Equippable & Consummable

This commit is contained in:
KuMiShi
2026-01-25 16:21:15 +01:00
parent 06877ebaec
commit 35824666ce
2 changed files with 28 additions and 6 deletions

View File

@@ -28,4 +28,12 @@ class Inventory(Serializable):
self.items.remove(r_item)
return f'{r_item.name} was removed from the inventory'
else:
return f'{r_item.name} is not present within the inventory'
return f'{r_item.name} is not present within the inventory'
def get_item(self, item_name:str):
for item in self.items:
if item.name == item_name:
return item
# The item was not found
return None