Opt: Clear interval before and after synthesize_confirm()

This commit is contained in:
LmeSzinc 2024-06-17 23:53:10 +08:00
parent b503443816
commit c94176fbd2

View File

@ -387,6 +387,7 @@ class Synthesize(CombatObtain, ItemUI):
out: page_synthesize, SYNTHESIZE_CONFIRM
"""
logger.hr('Synthesize confirm')
self.interval_clear([SYNTHESIZE_CONFIRM, page_synthesize.check_button])
def appear_confirm():
return self.image_color_count(SYNTHESIZE_CONFIRM, color=(226, 229, 232), threshold=221, count=1000)
@ -404,6 +405,7 @@ class Synthesize(CombatObtain, ItemUI):
break
# Click
if self.handle_popup_confirm():
self.interval_reset(page_synthesize.check_button)
continue
if appear_confirm() and self.ui_page_appear(page_synthesize, interval=2):
self.device.click(SYNTHESIZE_CONFIRM)
@ -425,6 +427,8 @@ class Synthesize(CombatObtain, ItemUI):
if self.handle_reward(click_button=SYNTHESIZE_MINUS):
continue
self.interval_clear([SYNTHESIZE_CONFIRM, page_synthesize.check_button])
def synthesize_exit(self, skip_first_screenshot=True):
"""
Pages: