This commit is contained in:
bridge
2025-12-14 14:59:25 +08:00
parent 864b03b460
commit 6b0bf25699
9 changed files with 113 additions and 30 deletions

View File

@@ -67,7 +67,7 @@ def load_game(save_path: Optional[Path] = None) -> Tuple["World", "Simulator", L
from src.classes.avatar import Avatar
from src.classes.sect import sects_by_id
from src.sim.simulator import Simulator
from src.run.create_map import create_cultivation_world_map, add_sect_headquarters
from src.run.load_map import load_cultivation_world_map
# 读取存档文件
with open(save_path, "r", encoding="utf-8") as f:
@@ -79,7 +79,7 @@ def load_game(save_path: Optional[Path] = None) -> Tuple["World", "Simulator", L
f"游戏时间: {meta.get('game_time', 'unknown')})")
# 重建地图(地图本身不变,只需重建宗门总部位置)
game_map = create_cultivation_world_map()
game_map = load_cultivation_world_map()
# 读取世界数据
world_data = save_data.get("world", {})
@@ -99,9 +99,6 @@ def load_game(save_path: Optional[Path] = None) -> Tuple["World", "Simulator", L
existed_sect_ids = world_data.get("existed_sect_ids", [])
existed_sects = [sects_by_id[sid] for sid in existed_sect_ids if sid in sects_by_id]
# 在地图上添加宗门总部
add_sect_headquarters(game_map, existed_sects)
# 第一阶段重建所有Avatar不含relations
avatars_data = save_data.get("avatars", [])
all_avatars = {}