diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-17 23:57:42 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-17 23:57:42 -0300 |
commit | 9ca52755356a90b43679545d6e2423a054cd5ccd (patch) | |
tree | 37c4b5b5e80568fba77d722c24171f5950cd06b7 | |
parent | 423e3032f662e9e7062c2e8220540fddadb475aa (diff) | |
download | client-9ca52755356a90b43679545d6e2423a054cd5ccd.tar.gz client-9ca52755356a90b43679545d6e2423a054cd5ccd.tar.bz2 client-9ca52755356a90b43679545d6e2423a054cd5ccd.tar.xz client-9ca52755356a90b43679545d6e2423a054cd5ccd.zip |
Remove comments and make server notices survive a whole minute by default.
-rw-r--r-- | game/04_init.rpy | 15 | ||||
-rw-r--r-- | game/screens.rpy | 4 |
2 files changed, 6 insertions, 13 deletions
diff --git a/game/04_init.rpy b/game/04_init.rpy index 482f85e..5593b60 100644 --- a/game/04_init.rpy +++ b/game/04_init.rpy @@ -20,27 +20,19 @@ init python: # FIXME: Drop dead if session_id mismatches (new "token") - # Same as ondata? - # FIXME: onmsg() runs within the thread, not the main app - # This means + # REMINDER: onmsg() runs within the thread, not the main app! def onmsg(self, message): global tr_load, tr_val, tr_busy stdout("Server : " + str(message)) # Wait wait, it might have been a SERVNOTICE! + # TODO: Validate the ServNotice with token or something try: if (message.split(':')[0] == "NOTICE"): - # FIXME - #renpy.notify(str(":".join(message.split(':')[1:]))) display_msgbox(str(":".join(message.split(':')[1:]))) - #raise NotImplemented("You cannot call screens from threads!") - #renpy.call_screen("msgbox", - #renpy.call_in_new_context("msgbox_label", - # "{b}SERVER NOTICE{b}\n\n%s" % str(":".join(message.split(':')[1:]))) return except: - raise - stdout("Error displaying SERVNOTICE") + stdout("Error displaying SERVNOTICE!!") return # Inform whatever is waiting for us that a reply was obtained @@ -93,6 +85,7 @@ init python: # I wonder if I can/should run this in a non-daemon thread? # But I sense the problem is not here but a level above # FIXME: renpy.quit() throws an exception - which in a thread is obviously not gonna work... + # I wonder if we can hack like we did with display_msgbox? Mhm. #renpy.quit(relaunch=True, status=1) except: pass diff --git a/game/screens.rpy b/game/screens.rpy index 4b544bf..6c34baa 100644 --- a/game/screens.rpy +++ b/game/screens.rpy @@ -1419,14 +1419,14 @@ screen notabox(message): textbutton _("Ok") action Hide('notabox') - timer 20.00 action Hide('notabox') + timer 60.00 action Hide('notabox') init python: def display_msgbox(message): """ :doc: other - The default implementation of :func:`renpy.notify`. + Override implementation of :func:`renpy.notify`. """ renpy.hide_screen('notabox') |