diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-17 02:50:12 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-17 02:50:12 -0300 |
commit | e1793335a756f491593a3f36e3d6b6eee2c7a005 (patch) | |
tree | 5a39ccb2a59dc3db6d582a2763ee72649f4b2c8d /game/02_init.rpy | |
parent | c707470f1e3b5ddfe82ef09d9b79905d09684ebe (diff) | |
download | client-e1793335a756f491593a3f36e3d6b6eee2c7a005.tar.gz client-e1793335a756f491593a3f36e3d6b6eee2c7a005.tar.bz2 client-e1793335a756f491593a3f36e3d6b6eee2c7a005.tar.xz client-e1793335a756f491593a3f36e3d6b6eee2c7a005.zip |
Replace websocket-client with ws4py
Both are dead but well, Python 2.7 is dead, soooo
Diffstat (limited to 'game/02_init.rpy')
-rw-r--r-- | game/02_init.rpy | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/game/02_init.rpy b/game/02_init.rpy index fb2749c..147cc91 100644 --- a/game/02_init.rpy +++ b/game/02_init.rpy @@ -16,7 +16,7 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ######################################################################################## -# Definitions +# Definitions: decode, encode, memory ############################################################################ init -1 python: # Android might have special SSL problems @@ -121,57 +121,6 @@ init -1 python: pass return Player["code"] - def send_packet(packet, args=""): - global tr_load, tr_val, tr_busy - # TODO: if tr_busy already true, wait until it is made false - while tr_busy: - sdelay() - - # Book processing space for ourselves - tr_busy=True - tr_load=False - tr_val=None - - # This is a secret variable which disables threading and queue - # This may cause hangs and other issues. - if persistent.nothreading: - send_packet_now(packet, args) - tr_busy=False - val=tr_val - return val - - # FIXME - timeout=0.0 - renpy.show("spinner", at_list=[truecenter]) - r = send_packet_now(packet, args) - if not r: - # Something went wrong - return ERR_INVALID - - while not tr_load: - sdelay() # FIXME: This can cause errors in mobile? - timeout+=0.02 - - if timeout >= TIMEOUT_INTERVAL: - # FIXME: What if a screen is already being displayed? BUG - try: - renpy.call_screen("msgbox", "Error Code: %d\n\nApplication timeout, click to try again" % (ERR_TIMEOUT)) - timeout=0.0 - except: - if not "ping" in packet.lower(): - stdout("WARNING, ILLEGAL PACKET ON SCREEN TIME: %s" % packet) - pass - - renpy.hide("spinner") - val=tr_val - tr_busy=False - del tr_val - - print "value obtained" - if (val is None): - return ERR_INVALID - return val - def GAME_LOADER(): global allunitsbase, allunits, allquests, allstory, allworld, alltaverns global allnews, tr_load |