Add v1.2 development quest progression and experimental battle runtime

This commit is contained in:
AttilaNet
2026-11-08 19:29:28 +08:00
parent 79b7672471
commit 0d3e231cde
71 changed files with 14349 additions and 172 deletions
+8 -4
View File
@@ -20,14 +20,15 @@ def map_source(snapshot):
@dataclass
class Views:
snapshot: object
monster_source: str
monster_source: str | None
managed: set
monsters: list
monsters: list | None
map_source: str
maps: list
stage_cache: object = None
statistics_store: object = None
drop_statistics: dict = None
progression: object = None
@dataclass
@@ -38,7 +39,10 @@ class Presented:
worker_ms: float = 0
def prepare_views(catalog, snapshot, managed, stage_cache=None, statistics=None):
return Views(snapshot, repr(snapshot.raw["monsters"]), set(managed), monster_rows(catalog, snapshot, managed),
def prepare_views(catalog, snapshot, managed, stage_cache=None, statistics=None, *, include_monsters=True):
"""Omitted monster rows stay dirty; the default preserves the full view API."""
source = repr(snapshot.raw["monsters"]) if include_monsters else None
monsters = monster_rows(catalog, snapshot, managed) if include_monsters else None
return Views(snapshot, source, set(managed), monsters,
str(snapshot.raw["master"]["id"]), stage_cache.get(snapshot) if stage_cache else stages(catalog, snapshot), stage_cache,
statistics, statistics.snapshot(snapshot.raw["master"]["id"]) if statistics else None)