code and adjusted entity, game, and event files to work with items being mandatory for entities.
17 lines
444 B
Python
17 lines
444 B
Python
# Game imports
|
|
from utils.serializable import Serializable
|
|
|
|
# Native imports
|
|
import uuid
|
|
|
|
class Item(Serializable):
|
|
def __init__(self,name:str, description:str, stat_modifier:dict[str, int]):
|
|
super().__init__()
|
|
self.id = str(uuid.uuid4())
|
|
self.name = name
|
|
self.description = description
|
|
self.stat_modifier = stat_modifier
|
|
|
|
def __str__(self):
|
|
return f"{self.name}: {self.description}"
|