summaryrefslogtreecommitdiff
path: root/game/client.rpy
diff options
context:
space:
mode:
Diffstat (limited to 'game/client.rpy')
-rw-r--r--game/client.rpy18
1 files changed, 10 insertions, 8 deletions
diff --git a/game/client.rpy b/game/client.rpy
index 4887e46..014da64 100644
--- a/game/client.rpy
+++ b/game/client.rpy
@@ -5,7 +5,7 @@
# Distributed under the MIT license, except for Steam parts.
#################################################################################
init 2 python:
- def handle_client(CLIENT_NAME="", launch=False, download=True):
+ def handle_client(CLIENT_NAME="", launch=False, download=True, force=False):
## Local variables
f=False
if (CLIENT_NAME == ""):
@@ -13,11 +13,11 @@ init 2 python:
## Main loop
if (CLIENT_NAME == "manaplus"):
- f=cli_manaplus(launch, download)
+ f=cli_manaplus(launch, download, force)
elif (CLIENT_NAME == "manaverse"):
- f=cli_manaverse(launch, download)
+ f=cli_manaverse(launch, download, force)
elif (CLIENT_NAME == "builtin"):
- f=cli_builtin(launch, download)
+ f=cli_builtin(launch, download, force)
else:
status_update("ERROR, unrecognized client: %s" % CLIENT_NAME)
@@ -249,10 +249,12 @@ init 2 python:
stdout("MD5 Mismatch: hashes differ", True)
stdout("Ours: %s" % md5us, True)
stdout("Them: %s" % md5up, True)
- shutil.rmtree(get_path("manaplus"))
+ #shutil.rmtree(get_path("manaplus")) # FIXME! Download new client and override only specific files instead
if not silent:
renpy.notify("Files are outdated!")
- stdout("Client is outdated.")
+ stdout("Client is outdated. Updating...")
+ handle_client(launch=False, download=True, force=True)
+ stdout("Client updated.")
return False
else:
if not silent:
@@ -261,9 +263,9 @@ init 2 python:
return True
except:
traceback.print_exc()
- shutil.rmtree(get_path("manaplus"))
+ #shutil.rmtree(get_path("manaplus")) # FIXME! Download new client and override only specific files instead
if not silent:
- renpy.notify("An error happened (outdated?)")
+ renpy.notify("An error happened, nothing was done.")
return False
############################################