Fix: [EN] Strict color match threshold on RESET_AVAILABLE

This commit is contained in:
LmeSzinc 2024-12-11 10:22:11 +08:00
parent 4ab8337324
commit a67bbba736

View File

@ -50,7 +50,7 @@ class RewardResearch(ResearchSelector, ResearchQueue, StorageHandler):
Returns: Returns:
bool: If reset success. bool: If reset success.
""" """
if not self.appear(RESET_AVAILABLE): if not self.appear(RESET_AVAILABLE, threshold=10):
logger.info('Research reset unavailable') logger.info('Research reset unavailable')
return False return False
@ -63,7 +63,7 @@ class RewardResearch(ResearchSelector, ResearchQueue, StorageHandler):
else: else:
self.device.screenshot() self.device.screenshot()
if self.appear_then_click(RESET_AVAILABLE, interval=10): if self.appear_then_click(RESET_AVAILABLE, interval=10, threshold=10):
continue continue
if self.handle_popup_confirm('RESEARCH_RESET'): if self.handle_popup_confirm('RESEARCH_RESET'):
executed = True executed = True