Skip to content

Commit

Permalink
Fix: campaign_ensure_chapter incorrect due to slow animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Air111 committed Apr 24, 2024
1 parent 0264e3f commit 9c37bf4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions module/campaign/campaign_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,20 @@ def campaign_ensure_chapter(self, index, skip_first_screenshot=True):
logger.attr("Index", current)
diff = index - current
if diff == 0:
break

# index=4, current=4, actual=14
error_confirm.start()
if not error_confirm.reached():
continue
else:
break
# 14-4 may be OCR as 4-1 due to slow animation, confirm if it is 4-1
if index >= 11 and index % 10 == current:
# index=14, current=4, actual=14
elif index >= 11 and index % 10 == current:
error_confirm.start()
if not error_confirm.reached():
continue
else:
error_confirm.reset()
error_confirm.clear()

# Switch
if retry.reached():
Expand Down

0 comments on commit 9c37bf4

Please sign in to comment.