From 215cb427af49a4e6b40601247445d384f2e828e6 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 29 Dec 2020 21:20:04 -0300 Subject: Sort the units by Unit ID --- 00_init.rpy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/00_init.rpy b/00_init.rpy index 4643ae7..6ab73e3 100644 --- a/00_init.rpy +++ b/00_init.rpy @@ -144,6 +144,9 @@ init -3 python: stdout("dlsearch: r is None") return r + def getuid(elem): + return elem["unit_id"] + def GAME_LOADER(): global allunitsbase, allunits, allquests, allstory, allworld, alltaverns global alltquests, tr_uptodate, tr_memcheck @@ -159,6 +162,7 @@ init -3 python: allunits={} for j in allunitsbase: allunits[j["unit_id"]]=j + allunitsbase.sort(key=getuid) # Load summons data f=open(get_path_if_exists("summons.json"), "r") -- cgit v1.2.3-60-g2f50