summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game/3rdparty/manaverse.rpy14
1 files changed, 13 insertions, 1 deletions
diff --git a/game/3rdparty/manaverse.rpy b/game/3rdparty/manaverse.rpy
index 9c25389..2909fb4 100644
--- a/game/3rdparty/manaverse.rpy
+++ b/game/3rdparty/manaverse.rpy
@@ -6,12 +6,24 @@
# Warning: Third Party game clients
#################################################################################
+####### Constants
+define manaverseWin64 = "https://manaplus.germantmw.de/manaplus/nightly/windows/manaverse.zip"
+define manaverseLinux = "https://manaplus.germantmw.de/manaplus/nightly/linux/ManaPlus-x86_64.AppImage"
+
+####### Main Code
init 1 python:
#############################################################################
def download_manaverse(fname):
installdir=get_path("manaplus")
status_update("Downloading %s on RAM..." % fname, 62)
- r=requests.get(persistent.host+"/%s" % fname, timeout=60.0)
+ ## TODO: use `stream=True`
+ if renpy.linux:
+ r=requests.get(manaverseLinux, timeout=60.0)
+ elif renpy.windows:
+ r=requests.get(manaverseWin64, timeout=60.0)
+ else:
+ r=requests.get(persistent.host+"/%s" % fname, timeout=60.0)
+
if (r.status_code != 200):
status_update("Failure retrieving M+: ERROR %d" % r.status_code)
return False