From 67d040a9cb1fead15e184c893631dd9e1590dc66 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 21 Dec 2020 10:46:49 -0300 Subject: Hopefully this will not explode... We DO need to restart interaction to update the AP bar. --- game/04_init.rpy | 1 + game/misc.rpy | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'game') diff --git a/game/04_init.rpy b/game/04_init.rpy index 616d7fd..8384682 100644 --- a/game/04_init.rpy +++ b/game/04_init.rpy @@ -41,6 +41,7 @@ init python: Player["ap"]=(int(":".join(message.split(':')[1:]))) # TODO: Reload timer (DynamicDisplayable(countdown, length=360.0)) Player["aptime"] = now() + renpy.restart_interaction() # I hope it does not explodes return except: stdout("Error enacting APREFRESH!!") diff --git a/game/misc.rpy b/game/misc.rpy index 41d8224..c46f1b9 100644 --- a/game/misc.rpy +++ b/game/misc.rpy @@ -294,7 +294,7 @@ image spinner: # Player data internals init python: def ap_restore(): - # TODO: Request AP Data from websocket + # Request AP Data from websocket raw=send_packet("apdata") apdata=json_decode(raw) try: @@ -308,6 +308,7 @@ init python: return def update_ap(): + # TODO: This aptime update might be wrong =/ But it will be overriden soon Player["aptime"] = now() renpy.invoke_in_thread(ap_restore) return -- cgit v1.2.3-70-g09d2