Item & Inventory

This commit is contained in:
KuMiShi
2026-01-23 17:10:04 +01:00
parent 831cbef7fa
commit 1c9d5fd4a8
5 changed files with 61 additions and 12 deletions

10
item.py
View File

@@ -1,5 +1,11 @@
from .serializable import Serializable
class Item(Serializable):
def __init__(self):
super().__init__()
def __init__(self,name:str, description:str, weight:float = 10.0):
super().__init__()
self.name = name
self.description = description
self.weight = weight
def __str__(self):
return self.name + '(' + self.weight + ' kg)' + ': ' + self.description