mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-19 14:13:34 +08:00
Fix: research project considered unavailable after RESEARCH_START clicked
This commit is contained in:
@@ -175,6 +175,7 @@ class RewardResearch(ResearchSelector):
|
|||||||
bool: If start success.
|
bool: If start success.
|
||||||
"""
|
"""
|
||||||
logger.info(f'Research project: {index}')
|
logger.info(f'Research project: {index}')
|
||||||
|
available = False
|
||||||
click_timer = Timer(10)
|
click_timer = Timer(10)
|
||||||
while 1:
|
while 1:
|
||||||
if skip_first_screenshot:
|
if skip_first_screenshot:
|
||||||
@@ -194,6 +195,7 @@ class RewardResearch(ResearchSelector):
|
|||||||
click_timer.reset()
|
click_timer.reset()
|
||||||
continue
|
continue
|
||||||
if max_rgb > 235 and self.appear_then_click(RESEARCH_START, offset=(5, 20), interval=10):
|
if max_rgb > 235 and self.appear_then_click(RESEARCH_START, offset=(5, 20), interval=10):
|
||||||
|
available = True
|
||||||
continue
|
continue
|
||||||
if self.handle_popup_confirm('RESEARCH_START'):
|
if self.handle_popup_confirm('RESEARCH_START'):
|
||||||
continue
|
continue
|
||||||
@@ -203,7 +205,7 @@ class RewardResearch(ResearchSelector):
|
|||||||
self.research_detail_quit()
|
self.research_detail_quit()
|
||||||
self.ensure_no_info_bar(timeout=3) # Research started
|
self.ensure_no_info_bar(timeout=3) # Research started
|
||||||
return True
|
return True
|
||||||
if max_rgb < 235 and self.appear(RESEARCH_UNAVAILABLE, offset=(5, 20)):
|
if not available and max_rgb <= 235 and self.appear(RESEARCH_UNAVAILABLE, offset=(5, 20)):
|
||||||
logger.info('Not enough resources to start this project')
|
logger.info('Not enough resources to start this project')
|
||||||
self.research_detail_quit()
|
self.research_detail_quit()
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user