What a mess
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user