diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-30 22:54:33 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-30 22:54:33 -0300 |
commit | 09eb61361532341917021a2a3a42ea3c7f3e922e (patch) | |
tree | b64f995ca25db11dcfa47640201da09c1d130224 | |
parent | c09cbde831245f44d52f1e44f29d7583a51d2d7c (diff) | |
download | sdk-09eb61361532341917021a2a3a42ea3c7f3e922e.tar.gz sdk-09eb61361532341917021a2a3a42ea3c7f3e922e.tar.bz2 sdk-09eb61361532341917021a2a3a42ea3c7f3e922e.tar.xz sdk-09eb61361532341917021a2a3a42ea3c7f3e922e.zip |
Correct sorting at save time
-rw-r--r-- | qeditor.rpy | 4 | ||||
-rw-r--r-- | ueditor.rpy | 1 |
2 files changed, 4 insertions, 1 deletions
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() |