summaryrefslogtreecommitdiff
path: root/game/defs.rpy
diff options
context:
space:
mode:
Diffstat (limited to 'game/defs.rpy')
-rw-r--r--game/defs.rpy11
1 files changed, 10 insertions, 1 deletions
diff --git a/game/defs.rpy b/game/defs.rpy
index ae53c57..226f7a4 100644
--- a/game/defs.rpy
+++ b/game/defs.rpy
@@ -20,7 +20,7 @@
init -3 python:
renpy.add_python_directory("python-extra")
- import requests, zlib, base64, sys, copy, uuid
+ import requests, zlib, base64, sys, copy, uuid, time
import websock as wsock
# set PYTHON_VERSION variable (should be 2713, 3605 could fail)
@@ -310,6 +310,7 @@ init -3 python:
# Download server news
# Handled by GAME_LOADER
+ tr_uptodate=True
tr_load=True
return tr_load
@@ -486,6 +487,13 @@ init -1 python:
global allnews, tr_load
tr_load=False
+ # Wait until everything is up to date
+ while not tr_uptodate:
+ try:
+ renpy.pause(0.02)
+ except:
+ time.sleep(0.02)
+
# Load unit data
allunitsbase=json.loads(requests.get("http://"+HOST+'/units.json').text)
# f=open(get_path_if_exists("units.json"), "r")
@@ -531,6 +539,7 @@ init -1 python:
stdout("[OK] Game data loaded to memory")
tr_load=True
+ tr_memcheck=True
return tr_load