mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-08-02 16:21:15 +08:00
Fix: get_oil() timeout check should run before oil icon check
This commit is contained in:
@@ -125,15 +125,15 @@ class CampaignStatus(UI):
|
||||
else:
|
||||
self.device.screenshot()
|
||||
|
||||
if not self.appear(OCR_OIL_CHECK, offset=(10, 2)):
|
||||
logger.info('No oil icon')
|
||||
continue
|
||||
|
||||
if timeout.reached():
|
||||
logger.warning('Get oil timeout')
|
||||
oil = 0
|
||||
break
|
||||
|
||||
if not self.appear(OCR_OIL_CHECK, offset=(10, 2)):
|
||||
logger.info('No oil icon')
|
||||
continue
|
||||
|
||||
oil = self._get_num(OCR_OIL, 'OCR_OIL', (247, 247, 247))
|
||||
if last_oil == oil and oil >= 100:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user