diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-16 16:07:42 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-16 16:07:42 -0300 |
commit | 2b7a89b054a5c95e012ce16d266b979061bc4659 (patch) | |
tree | 8775df50f3df2bee84320c5cf4ae4a0a16511c72 | |
parent | fba89f64f6f69e9a0d58c0ea67d4d3cca2e242b4 (diff) | |
download | client-2b7a89b054a5c95e012ce16d266b979061bc4659.tar.gz client-2b7a89b054a5c95e012ce16d266b979061bc4659.tar.bz2 client-2b7a89b054a5c95e012ce16d266b979061bc4659.tar.xz client-2b7a89b054a5c95e012ce16d266b979061bc4659.zip |
Do not relaunch when not needed.
Define the config name and version at stage -2 as in previous Ren'Py versions
-rw-r--r-- | game/misc.rpy | 13 | ||||
-rw-r--r-- | game/options.rpy | 19 |
2 files changed, 21 insertions, 11 deletions
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. |