@@ -194,6 +194,7 @@ def load_game(save_path: Optional[Path] = None) -> Tuple["World", "Simulator", L
|
||||
# 读取世界数据
|
||||
world_data = save_data.get("world", {})
|
||||
month_stamp = MonthStamp(world_data["month_stamp"])
|
||||
start_year = world_data.get("start_year", 100)
|
||||
|
||||
# 计算事件数据库路径。
|
||||
events_db_path = get_events_db_path(save_path)
|
||||
@@ -203,6 +204,7 @@ def load_game(save_path: Optional[Path] = None) -> Tuple["World", "Simulator", L
|
||||
map=game_map,
|
||||
month_stamp=month_stamp,
|
||||
events_db_path=events_db_path,
|
||||
start_year=start_year,
|
||||
)
|
||||
|
||||
# 恢复世界历史
|
||||
|
||||
@@ -117,6 +117,7 @@ def save_game(
|
||||
|
||||
world_data = {
|
||||
"month_stamp": int(world.month_stamp),
|
||||
"start_year": world.start_year,
|
||||
"existed_sect_ids": [sect.id for sect in existed_sects],
|
||||
# 天地灵机
|
||||
"current_phenomenon_id": world.current_phenomenon.id if world.current_phenomenon else None,
|
||||
|
||||
@@ -267,6 +267,10 @@ class Simulator:
|
||||
Gathering 结算阶段:
|
||||
检查并执行注册的多人聚集事件(如拍卖会、大比等)。
|
||||
"""
|
||||
# 第一年不触发聚集事件,给予发育缓冲
|
||||
if self.world.month_stamp.get_year() <= self.world.start_year:
|
||||
return []
|
||||
|
||||
return await self.world.gathering_manager.check_and_run_all(self.world)
|
||||
|
||||
def _phase_update_celestial_phenomenon(self):
|
||||
|
||||
Reference in New Issue
Block a user