mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-30 08:33:50 +08:00
Fix: OCR must be done in the archive campaign stage map, verify able to
This commit is contained in:
@@ -8,12 +8,14 @@ DATA_KEY_CAMPAIGN = DigitCounter(OCR_DATA_KEY_CAMPAIGN, letter=(255, 247, 247),
|
|||||||
|
|
||||||
class CampaignWarArchives(CampaignRun, CampaignBase):
|
class CampaignWarArchives(CampaignRun, CampaignBase):
|
||||||
def triggered_stop_condition(self):
|
def triggered_stop_condition(self):
|
||||||
# Check for 0 data keys left to use
|
# In case already inside campaign, OCR cannot be read otherwise
|
||||||
current, remain, total = DATA_KEY_CAMPAIGN.ocr(self.device.image)
|
if self._in_archives_campaign():
|
||||||
logger.info(f'Inventory: {current} / {total}, Remain: {current}')
|
# Check for 0 data keys left to use
|
||||||
if remain == total:
|
current, remain, total = DATA_KEY_CAMPAIGN.ocr(self.device.image)
|
||||||
logger.hr('Triggered out of data keys')
|
logger.info(f'Inventory: {current} / {total}, Remain: {current}')
|
||||||
return True
|
if remain == total:
|
||||||
|
logger.hr('Triggered out of data keys')
|
||||||
|
return True
|
||||||
|
|
||||||
# Else, check other stop conditions
|
# Else, check other stop conditions
|
||||||
return super().triggered_stop_condition()
|
return super().triggered_stop_condition()
|
||||||
Reference in New Issue
Block a user