mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-08 11:26:52 +08:00
Opt: Copy the detection of MISSION_CHECKOUT to all its usages
This commit is contained in:
@@ -70,13 +70,17 @@ class MissionHandler(GlobeOperation, ZoneManager):
|
|||||||
# End
|
# End
|
||||||
if self.appear(MISSION_CHECK, offset=(20, 20)) \
|
if self.appear(MISSION_CHECK, offset=(20, 20)) \
|
||||||
and not self.appear(MISSION_FINISH, offset=(20, 20)) \
|
and not self.appear(MISSION_FINISH, offset=(20, 20)) \
|
||||||
and not self.appear(MISSION_CHECKOUT, offset=(20, 20)):
|
and not (self.appear(MISSION_CHECKOUT, offset=(20, 20))
|
||||||
|
and MISSION_CHECKOUT.match_appear_on(self.device.image)):
|
||||||
# No mission found, wait to confirm. Missions might not be loaded so fast.
|
# No mission found, wait to confirm. Missions might not be loaded so fast.
|
||||||
if confirm_timer.reached():
|
if confirm_timer.reached():
|
||||||
|
logger.info('No OS mission found.')
|
||||||
break
|
break
|
||||||
elif self.appear(MISSION_CHECK, offset=(20, 20)) \
|
elif self.appear(MISSION_CHECK, offset=(20, 20)) \
|
||||||
and self.appear(MISSION_CHECKOUT, offset=(20, 20)):
|
and (self.appear(MISSION_CHECKOUT, offset=(20, 20))
|
||||||
|
and MISSION_CHECKOUT.match_appear_on(self.device.image)):
|
||||||
# Found one mission.
|
# Found one mission.
|
||||||
|
logger.info('Found at least one OS missions.')
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
confirm_timer.reset()
|
confirm_timer.reset()
|
||||||
|
|||||||
Reference in New Issue
Block a user