add circulation manager
This commit is contained in:
@@ -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", [])
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user