Release v0.2.10: Update package-lock.json and CI config

This commit is contained in:
Joan
2025-12-30 18:51:21 +01:00
parent 8b31011334
commit 592f38827e
108 changed files with 2755 additions and 1112 deletions

View File

@@ -4,14 +4,14 @@ Loads game data from JSON files without bot dependencies.
"""
import json
from pathlib import Path
from typing import Dict, List, Any, Optional
from typing import Dict, List, Any, Optional, Union
from dataclasses import dataclass, field
@dataclass
class Outcome:
"""Represents an outcome of an action"""
text: str
text: Union[str, Dict[str, str]]
items_reward: Dict[str, int] = field(default_factory=dict)
damage_taken: int = 0
@@ -20,7 +20,7 @@ class Outcome:
class Action:
"""Represents an action that can be performed on an interactable"""
id: str
label: str
label: Union[str, Dict[str, str]]
stamina_cost: int = 2
outcomes: Dict[str, Outcome] = field(default_factory=dict)
@@ -32,7 +32,7 @@ class Action:
class Interactable:
"""Represents an interactable object"""
id: str
name: str
name: Union[str, Dict[str, str]]
image_path: str = ""
actions: List[Action] = field(default_factory=list)
@@ -52,8 +52,8 @@ class Exit:
class Location:
"""Represents a location in the game world"""
id: str
name: str
description: str
name: Union[str, Dict[str, str]]
description: Union[str, Dict[str, str]]
image_path: str = ""
exits: Dict[str, str] = field(default_factory=dict) # direction -> destination_id
exit_stamina: Dict[str, int] = field(default_factory=dict) # direction -> stamina_cost