From 2b7a89b054a5c95e012ce16d266b979061bc4659 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 16 Dec 2020 16:07:42 -0300 Subject: Do not relaunch when not needed. Define the config name and version at stage -2 as in previous Ren'Py versions --- game/misc.rpy | 13 +++++++++++-- game/options.rpy | 19 ++++++++++--------- 2 files changed, 21 insertions(+), 11 deletions(-) (limited to 'game') diff --git a/game/misc.rpy b/game/misc.rpy index a92acd8..0313cc5 100644 --- a/game/misc.rpy +++ b/game/misc.rpy @@ -166,10 +166,13 @@ init python: label clear_all: python: + rl=False + # Your version is no longer valid if (HOST != persistent.host): print("Host changed from %s to %s" % (str(HOST), persistent.host)) persistent.version=1 + rl=True # TODO: Clear cache # Update host and delete password @@ -178,10 +181,16 @@ label clear_all: renpy.notify("Deleting password: %s" % persistent.password) persistent.password=None - "Spheres" "Server data purged, we will now relaunch the game." if debug or config.developer: "Spheres" "Techinical info:\n\nServer: [HOST]:[PORT]" - $renpy.quit(relaunch=True) + + if rl: + "Spheres" "Server data purged, we will now relaunch the game." + $renpy.quit(relaunch=True) + else: + "Spheres" "You have logged out successfully." + $ renpy.full_restart() + # ??? jump start label clear_cache: diff --git a/game/options.rpy b/game/options.rpy index 06713f2..9318b6b 100644 --- a/game/options.rpy +++ b/game/options.rpy @@ -7,12 +7,17 @@ ## Basics ###################################################################### -## A human-readable name of the game. This is used to set the default window -## title, and shows up in the interface and error reports. -## -## The _() surrounding the string marks it as eligible for translation. +init -2 python: + ## A human-readable name of the game. This is used to set the default window + ## title, and shows up in the interface and error reports. + ## + ## The _() surrounding the string marks it as eligible for translation. + + config.name = _("Mana Spheres") -define config.name = _("Mana Spheres") + ## The version of the game. + + config.version = "2.0.12.15" ## Determines if the title given above is shown on the main menu screen. Set @@ -21,10 +26,6 @@ define config.name = _("Mana Spheres") define gui.show_name = True -## The version of the game. - -define config.version = "2.0.12.15" - ## Text that is placed on the game's about screen. Place the text between the ## triple-quotes, and leave a blank line between paragraphs. -- cgit v1.2.3-70-g09d2