chore(tools): 更新搭建指南和level-builder输出/解析器

This commit is contained in:
2026-06-09 19:12:36 +08:00
parent 5367d82407
commit 7bbcd9696e
4 changed files with 299 additions and 284 deletions
@@ -624,13 +624,23 @@ class BuildGuideParser:
i += 1
def _parse_global_row(self, row: dict) -> Optional[ActorData]:
"""解析全局物件行。"""
"""解析全局物件行。支持可选的旋转和缩放列。"""
name = clean_cell(row.get("Actor 名称", row.get("Actor名称", "")))
if not name:
return None
asset_key = clean_cell(row.get("资产", ""))
location = parse_location(row.get("位置 (X,Y,Z)", row.get("位置", "")))
# 旋转(可选)
rot_col = (row.get("旋转 (Pitch,Yaw,Roll)")
or row.get("旋转 (P,Y,R)")
or row.get("旋转", ""))
rotation = parse_rotation(rot_col) if rot_col else (0.0, 0.0, 0.0)
# 缩放(可选)
scale = parse_scale(row.get("缩放", "—"))
material = clean_cell(row.get("材质", ""))
if material in ('—', '–', '-'):
material = ""
@@ -650,6 +660,8 @@ class BuildGuideParser:
category=category,
zone_id=zone_id,
location=location,
rotation=rotation,
scale=scale,
material=material,
folder=self._get_folder(zone_id, category),
)