From 09eb61361532341917021a2a3a42ea3c7f3e922e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 30 Dec 2020 22:54:33 -0300 Subject: Correct sorting at save time --- qeditor.rpy | 4 +++- ueditor.rpy | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/qeditor.rpy b/qeditor.rpy index 393034a..1aed0fc 100644 --- a/qeditor.rpy +++ b/qeditor.rpy @@ -226,7 +226,9 @@ init python: return def qeditor_save(): - global allquests + global alltquests, allquests + alltquests["Main"].sort(key=lambda x: x["quest_id"]) + allquests=alltquests["Main"] f=open(get_path("quests.editor.json"), "w") json.dump(allquests, f, indent=4, separators=(',', ': ')) f.close() diff --git a/ueditor.rpy b/ueditor.rpy index 055de35..453dc02 100644 --- a/ueditor.rpy +++ b/ueditor.rpy @@ -227,6 +227,7 @@ init python: def ueditor_save(): global allunitsbase + allunitsbase.sort(key=lambda x: x["unit_id"]) f=open(get_path("units.editor.json"), "w") json.dump(allunitsbase, f, indent=4, separators=(',', ': ')) f.close() -- cgit v1.2.3-60-g2f50