diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-08-18 00:41:47 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-08-18 00:41:47 -0300 |
commit | a878b43f3c44a4b604c291688b7d108e790370c6 (patch) | |
tree | b2cd132f2554cf1aaa24c5b73477573c536bd50f /game | |
parent | 5977a645fb300ca3df3e091a947647e51f9eab3e (diff) | |
download | client-2.1.8.18.tar.gz client-2.1.8.18.tar.bz2 client-2.1.8.18.tar.xz client-2.1.8.18.zip |
Version 2.1.8.18v2.1.8.18
Detect outdated client/server and report
Diffstat (limited to 'game')
-rw-r--r-- | game/01_init.rpy | 1 | ||||
-rw-r--r-- | game/02_init.rpy | 6 | ||||
-rw-r--r-- | game/options.rpy | 2 | ||||
-rw-r--r-- | game/script.rpy | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/game/01_init.rpy b/game/01_init.rpy index 20a2d4c..7015bc5 100644 --- a/game/01_init.rpy +++ b/game/01_init.rpy @@ -71,6 +71,7 @@ init -3 python: ERR_INVFULL=106 ERR_SUMMON=108 ERR_OK=200 + ERR_OUTDATED=401 # All error code library ERRNO=[FAILUREMSG, OFFLINEMSG, OKMSG, ERR_LOGIN_DEFAULT, ERR_INVALID, ERR_TIMEOUT, ERR_NOGEMS, ERR_INVFULL, ERR_OK] diff --git a/game/02_init.rpy b/game/02_init.rpy index 3791413..9ee3749 100644 --- a/game/02_init.rpy +++ b/game/02_init.rpy @@ -55,10 +55,8 @@ init -1 python: if raw in ERRNO: return raw - try: + if (type(raw) is int): return int(raw) - except: - pass # Maybe base 64 try: @@ -104,6 +102,8 @@ init -1 python: return ERR_JSONDECODER if (Player == ERR_LOGIN_DEFAULT): return ERR_LOGIN_DEFAULT + if (Player == ERR_OUTDATED): + return ERR_OUTDATED try: Player["inv"]=dlist() diff --git a/game/options.rpy b/game/options.rpy index 2d7ef01..ebc2048 100644 --- a/game/options.rpy +++ b/game/options.rpy @@ -17,7 +17,7 @@ init -2 python: ## The version of the game. - config.version = "2.1.8.8" + config.version = "2.1.8.18" ## Determines if the title given above is shown on the main menu screen. Set diff --git a/game/script.rpy b/game/script.rpy index 619d532..5f548c5 100644 --- a/game/script.rpy +++ b/game/script.rpy @@ -70,6 +70,9 @@ label login: if (message == ERR_LOGIN_DEFAULT): e "Error Code: [message]{fast}\n\nCould not estabilish connection to server." jump login + elif (message == ERR_OUTDATED): + e "A new update is available!\n\nPlease download it from app store or at {a=https://spheres.tmw2.org/download}spheres.tmw2.org{/a}." + jump quit else: e "Error Code: [message]{fast}\n\nCannot login to server. Terminating." jump quit |