modified some Python files
This commit is contained in:
4
item.py
4
item.py
@@ -1,4 +1,4 @@
|
||||
from .serializable import Serializable
|
||||
from serializable import Serializable
|
||||
|
||||
class Item(Serializable):
|
||||
def __init__(self,name:str, description:str, stat_modifier:str, weight:float = 10.0):
|
||||
@@ -9,7 +9,7 @@ class Item(Serializable):
|
||||
self.weight = weight
|
||||
|
||||
def __str__(self):
|
||||
return self.name + '(' + self.weight + ' kg)' + ': ' + self.description
|
||||
return f"{self.name} ({self.weight} kg): {self.description}"
|
||||
|
||||
class Equippable(Item):
|
||||
def __init__(self, name, description, stat_modifier, equipped:bool, weight = 10.0):
|
||||
|
||||
Reference in New Issue
Block a user