summaryrefslogtreecommitdiff
path: root/game/04_init.rpy
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-17 23:57:42 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-17 23:57:42 -0300
commit9ca52755356a90b43679545d6e2423a054cd5ccd (patch)
tree37c4b5b5e80568fba77d722c24171f5950cd06b7 /game/04_init.rpy
parent423e3032f662e9e7062c2e8220540fddadb475aa (diff)
downloadclient-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.
Diffstat (limited to 'game/04_init.rpy')
-rw-r--r--game/04_init.rpy15
1 files changed, 4 insertions, 11 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