What a mess

This commit is contained in:
Joan
2025-11-07 15:27:13 +01:00
parent 0b79b3ae59
commit 33cc9586c2
130 changed files with 29819 additions and 1175 deletions

View File

@@ -34,6 +34,9 @@ class Location:
image_path: Optional[str] = None
x: float = 0.0 # X coordinate for map positioning
y: float = 0.0 # Y coordinate for map positioning
tags: list = field(default_factory=list) # Location tags like 'workbench', 'safe_zone', etc.
npcs: list = field(default_factory=list) # NPCs at this location
danger_level: int = 0 # Danger level of the location
def add_exit(self, direction: str, destination_id: str):
self.exits[direction] = destination_id

View File

@@ -120,7 +120,10 @@ def load_world() -> World:
description=loc_data['description'],
image_path=loc_data['image_path'],
x=loc_data.get('x', 0.0),
y=loc_data.get('y', 0.0)
y=loc_data.get('y', 0.0),
tags=loc_data.get('tags', []),
npcs=loc_data.get('npcs', []),
danger_level=loc_data.get('danger_level', 0)
)
# Add interactables using template-based format