fixed up updater
This commit is contained in:
parent
77e78a73eb
commit
057273552b
4 changed files with 29 additions and 37 deletions
|
|
@ -18,6 +18,8 @@ def scene_mst(qdb, old_path, dir_in, languages):
|
|||
|
||||
locations = load_locations(dir_in)
|
||||
|
||||
print(locations)
|
||||
|
||||
for id, scene in scenes.items():
|
||||
i = 0
|
||||
while True:
|
||||
|
|
@ -26,18 +28,14 @@ def scene_mst(qdb, old_path, dir_in, languages):
|
|||
except KeyError as exc:
|
||||
i += 1
|
||||
if i == len(scene["Parts"]):
|
||||
raise KeyError(
|
||||
f"Could not find folder for scene {id}"
|
||||
) from exc
|
||||
raise KeyError(f"Could not find folder for scene {id}") from exc
|
||||
continue
|
||||
break
|
||||
|
||||
with io.open(
|
||||
os.path.join(old_path, "XduScene.json"), "w", newline="\n"
|
||||
) as json_file:
|
||||
json.dump(
|
||||
scenes, json_file, ensure_ascii=False, indent="\t", sort_keys=True
|
||||
)
|
||||
json.dump(scenes, json_file, ensure_ascii=False, indent="\t", sort_keys=True)
|
||||
|
||||
for lang in languages:
|
||||
out_dict = {}
|
||||
|
|
@ -66,11 +64,7 @@ def scene_mst(qdb, old_path, dir_in, languages):
|
|||
|
||||
with io.open(langfile, "w", newline="\n") as lang_file:
|
||||
json.dump(
|
||||
out_dict,
|
||||
lang_file,
|
||||
ensure_ascii=False,
|
||||
indent="\t",
|
||||
sort_keys=True,
|
||||
out_dict, lang_file, ensure_ascii=False, indent="\t", sort_keys=True,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -80,9 +74,7 @@ def quest_mst(qdb, old_path, languages):
|
|||
with io.open(
|
||||
os.path.join(old_path, "XduQuest.json"), "w", newline="\n"
|
||||
) as json_file:
|
||||
json.dump(
|
||||
quests, json_file, ensure_ascii=False, indent="\t", sort_keys=True
|
||||
)
|
||||
json.dump(quests, json_file, ensure_ascii=False, indent="\t", sort_keys=True)
|
||||
|
||||
for lang in languages:
|
||||
out_dict = {}
|
||||
|
|
@ -101,11 +93,7 @@ def quest_mst(qdb, old_path, languages):
|
|||
|
||||
with io.open(langfile, "w", newline="\n") as lang_file:
|
||||
json.dump(
|
||||
out_dict,
|
||||
lang_file,
|
||||
ensure_ascii=False,
|
||||
indent="\t",
|
||||
sort_keys=True,
|
||||
out_dict, lang_file, ensure_ascii=False, indent="\t", sort_keys=True,
|
||||
)
|
||||
|
||||
return quests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue