summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-29 21:20:04 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-29 21:20:04 -0300
commit215cb427af49a4e6b40601247445d384f2e828e6 (patch)
treed67dee99614972ad26b82c5c125095dff2d5e879
parent4107a09929d89ae437ca30ce00aec7628c0c785d (diff)
downloadsdk-215cb427af49a4e6b40601247445d384f2e828e6.tar.gz
sdk-215cb427af49a4e6b40601247445d384f2e828e6.tar.bz2
sdk-215cb427af49a4e6b40601247445d384f2e828e6.tar.xz
sdk-215cb427af49a4e6b40601247445d384f2e828e6.zip
Sort the units by Unit ID
-rw-r--r--00_init.rpy4
1 files changed, 4 insertions, 0 deletions
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")