summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game/01_init.rpy7
-rw-r--r--game/03_init.rpy2
2 files changed, 8 insertions, 1 deletions
diff --git a/game/01_init.rpy b/game/01_init.rpy
index 15e8b2a..0a71d63 100644
--- a/game/01_init.rpy
+++ b/game/01_init.rpy
@@ -129,6 +129,13 @@ init -3 python:
time.sleep(delta)
return
+ # IF Then Else (IFTE)
+ def ifte(ifs, then, elses):
+ if (ifs):
+ return then
+ else:
+ return elses
+
# Global classes
# We need to override standard list method. Original by Triptych (stackoverflow)
diff --git a/game/03_init.rpy b/game/03_init.rpy
index 9524dfa..2db95cd 100644
--- a/game/03_init.rpy
+++ b/game/03_init.rpy
@@ -252,7 +252,7 @@ init python:
f=open(get_path(addr), "w")
stdout("Downloading additional file: %s" % img.replace(" ", "_"))
try:
- x=requests.get("https://%s/assets/%s?token=%s" % (HOST, img.replace(" ", "_"), get_token()), verify=False) # , timeout=8.0 → Need to handle sudden death
+ x=requests.get("%s://%s/assets/%s?token=%s" % (ifte(persistent.ssl_enabled, "https", "http"), HOST, img.replace(" ", "_"), get_token()), verify=False) # , timeout=8.0 → Need to handle sudden death
except:
# Oh noes - something went *terribly* wrong
traceback.print_exc()