summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-24 19:53:38 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-24 19:53:38 -0300
commit8e3fd3eb61c82070bff74135fb45c4d275946fc2 (patch)
treeb581ac417d70a33e7a54ce3ba272a947a7a367a0
parentcda7e179bc9ea8f613b9e547ba5179577d0a610e (diff)
downloadclient-8e3fd3eb61c82070bff74135fb45c4d275946fc2.tar.gz
client-8e3fd3eb61c82070bff74135fb45c4d275946fc2.tar.bz2
client-8e3fd3eb61c82070bff74135fb45c4d275946fc2.tar.xz
client-8e3fd3eb61c82070bff74135fb45c4d275946fc2.zip
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.
-rw-r--r--game/battle.rpy10
1 files changed, 9 insertions, 1 deletions
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