1
0
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:
positnuec
2026-08-01 17:20:59 +08:00
parent c8e8ac6fec
commit 6d9534c41d

View File

@@ -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