add circulation manager

This commit is contained in:
bridge
2026-01-03 22:15:25 +08:00
parent f499f63c50
commit 5b5cd79cb5
6 changed files with 321 additions and 0 deletions

View File

@@ -94,6 +94,10 @@ def load_game(save_path: Optional[Path] = None) -> Tuple["World", "Simulator", L
if phenomenon_id is not None and phenomenon_id in celestial_phenomena_by_id:
world.current_phenomenon = celestial_phenomena_by_id[phenomenon_id]
world.phenomenon_start_year = world_data.get("phenomenon_start_year", 0)
# 恢复出世物品流转
circulation_data = world_data.get("circulation", {})
world.circulation.load_from_dict(circulation_data)
# 获取本局启用的宗门
existed_sect_ids = world_data.get("existed_sect_ids", [])

View File

@@ -95,6 +95,8 @@ def save_game(
"current_phenomenon_id": world.current_phenomenon.id if world.current_phenomenon else None,
"phenomenon_start_year": world.phenomenon_start_year if hasattr(world, 'phenomenon_start_year') else 0,
"cultivate_regions_hosts": cultivate_regions_hosts,
# 出世物品流转
"circulation": world.circulation.to_save_dict(),
}
# 保存所有Avatar第一阶段不含relations