die cpID wurde umbenannt.

This commit is contained in:
2025-09-25 13:36:34 +02:00
parent abadf0dea8
commit 51ce51a5a4
68 changed files with 4190 additions and 4161 deletions
@@ -87,24 +87,27 @@ def process_files(json_file_path, txt_files_dir):
json_cp = json_item["connectionPoints"][i]
# 记录旧值
old_id = cp["id"]
old_x = cp["x"]
old_y = cp["y"]
old_dir = cp["direction"]
# 更新为新值
cp["id"] = json_cp["id"]
cp["x"] = json_cp["x"]
cp["y"] = json_cp["y"]
if json_cp["direction"]==360:
if json_cp["direction"] == 360:
cp["direction"] = 0
else:
cp["direction"] = json_cp["direction"]
# 记录变更
cp_changes.append({
"id": cp["id"],
"id": (old_id, cp["id"]),
"x": (old_x, cp["x"]),
"y": (old_y, cp["y"]),
"direction": (old_dir, cp["direction"])
})
})
# Write back to TXT file
with open(txt_file_path, 'w', encoding='utf-8') as f:
json.dump(txt_content, f, indent=2, ensure_ascii=False)