Bug fixes
* Fixed updater (AGAIN!!) * Disabled the 'server not responding' hint because it doesn't really match what's happening in the server code * Version bump
This commit is contained in:
parent
18721850f5
commit
37ed32f50d
@ -255,7 +255,7 @@ screen navigation(title=None):
|
||||
if not title:
|
||||
|
||||
if not renpy.mobile:
|
||||
if version_float(UPDATE_VER) < version_float():
|
||||
if version_float(UPDATE_VER) > version_float():
|
||||
textbutton "Install updates" action InstallUpdates() style_prefix "update_available" sensitive (not prerelease)
|
||||
else:
|
||||
textbutton "Check for updates" action CheckUpdates(300) sensitive (not prerelease)
|
||||
|
@ -38,7 +38,7 @@ define config.debug = config.developer or prerelease
|
||||
define config.console = True
|
||||
|
||||
# Game version and naming
|
||||
define config.version = "1.45.2"
|
||||
define config.version = "1.45.3"
|
||||
define compatible_version = 1.451
|
||||
define config.name = "Witch Trainer Silver"
|
||||
|
||||
|
@ -5,6 +5,10 @@ init python:
|
||||
UPDATE_VER = None
|
||||
UPDATE_HINT = ""
|
||||
|
||||
if config.developer:
|
||||
persistent._update_version = {}
|
||||
persistent._update_last_checked = {}
|
||||
|
||||
@renpy.pure
|
||||
class CheckUpdates(Action):
|
||||
def __init__(self, interval=3600*6, simulate=None, onetime=False, autostart=True, **kwargs):
|
||||
@ -52,15 +56,15 @@ init python:
|
||||
|
||||
UPDATE_VER = persistent._update_version.get(url, None)
|
||||
|
||||
if version_float(UPDATE_VER) < version_float():
|
||||
if version_float(UPDATE_VER) > version_float():
|
||||
if not self.onetime:
|
||||
UPDATE_HINT = "New game version available!"
|
||||
renpy.restart_interaction()
|
||||
|
||||
if self.autostart:
|
||||
renpy.invoke_in_new_context(updater.update, self.url, simulate=self.simulate, **self.kwargs)
|
||||
elif not UPDATE_VER:
|
||||
ui.timer(2.0, SetVariable("UPDATE_HINT", "Server is not responding."))
|
||||
# elif not UPDATE_VER:
|
||||
# ui.timer(2.0, SetVariable("UPDATE_HINT", "Server is not responding."))
|
||||
elif not self.onetime:
|
||||
ui.timer(2.0, SetVariable("UPDATE_HINT", "You are already up-to-date."))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user