diff options
Diffstat (limited to 'game')
-rw-r--r-- | game/04_init.rpy | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/game/04_init.rpy b/game/04_init.rpy index f021ed1..482ddde 100644 --- a/game/04_init.rpy +++ b/game/04_init.rpy @@ -53,21 +53,6 @@ init python: # We do not clean tr_busy here return - def ondata(self, msg, dtype, cont): - #print("INFO: data received\n") - """ - on_data: callback object which is called when a message received. - This is called before on_message or on_cont_message, - and then on_message or on_cont_message is called. - on_data has 4 argument. - The 1st argument is this class object. - The 2nd argument is utf-8 string which we get from the server. - The 3rd argument is data type. ABNF.OPCODE_TEXT or ABNF.OPCODE_BINARY will be came. - The 4th argument is continue flag. if 0, the data continue - """ - #renpy.notify(msg) - return - def onopen(self): global tr_busy, tr_load, tr_val, HOST print("Opening connection to %s" % HOST) @@ -84,22 +69,11 @@ init python: stdout("ERROR RECEIVED") stdout("More details: %s" % repr(err)) stdout("An error happened: %s" % str(err)) - # FIXME: If such error happen, the game never dies - # This is a huge problem o.o - # Now it might die suddenly... In case it is already exiting... + # NOTE: Game might die suddenly... In case it is already exiting... try: renpy.call_screen("msgbox", - "An unrecoverable error happened.\nPlease close and re-open the app.") - # "An unrecoverable error happened.\nPress OK to return to main menu screen.") - #raise KeyboardException(str(err)) - #raise err - # FIXME: Not working, and the loop also does not work - # Maybe because it causes an Exception? - # 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) + # "An unrecoverable error happened.\nPlease close and re-open the app.") + "An unrecoverable error happened.\nPress OK to return to main menu screen.") except: pass TERMINATE=True # Relay a TERM to overlay |