From 8e3fd3eb61c82070bff74135fb45c4d275946fc2 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 24 Dec 2020 19:53:38 -0300 Subject: Use a bloated code to call battle screen, which is safer against race condition. Ideally, though, we should move from call_screen to show_screen, Return() to SetVariable(), and have a while loop detecting all that. --- game/battle.rpy | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'game') diff --git a/game/battle.rpy b/game/battle.rpy index 86831d7..f41886c 100644 --- a/game/battle.rpy +++ b/game/battle.rpy @@ -38,7 +38,15 @@ label combat: # TODO: Swap units support # TODO: Display Spheres in the right place $ use_sphere=[AP_NONE, AP_NONE, AP_NONE, AP_NONE, AP_NONE] - call screen battle + python: + try: + renpy.call_screen("battle") + except: + traceback.print_exc() + stdout("FAILED to render battle screen, trying again...") + sdelay(0.5) + renpy.jump("combat") + $stdout("================= call ended") # TODO: Send to server new arrangement of units -- cgit v1.2.3-70-g09d2