Răsfoiți Sursa

fix(Exploration): add timeout for shikigami addition

stigma 10 luni în urmă
părinte
comite
c5415b39ce
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      tasks/Exploration/base.py

+ 4 - 0
tasks/Exploration/base.py

@@ -228,7 +228,11 @@ class BaseExploration(GameUi, GeneralBattle, GeneralRoom, GeneralInvite, Replace
                 self.swipe(self.S_SWIPE_SHIKI_TO_LEFT)
                 self.swipe(self.S_SWIPE_SHIKI_TO_LEFT)
             else:
             else:
                 break
                 break
+        operation_timeout = Timer(60)
+        operation_timeout.start()
         while 1:
         while 1:
+            if operation_timeout.reached():
+                raise GameStuckError('Adding shikigami timeout')
             # 候补出战数量识别
             # 候补出战数量识别
             self.screenshot()
             self.screenshot()
             if not self.appear(self.I_E_OPEN_SETTINGS):
             if not self.appear(self.I_E_OPEN_SETTINGS):