1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 16:47:03 +08:00

Fix: Handle campaign name OCR result started with 0

This commit is contained in:
LmeSzinc
2023-03-01 12:23:22 +08:00
parent d018bb08ff
commit 311c1fc50d

View File

@@ -249,6 +249,10 @@ class CampaignOcr(ModuleBase):
counter = collections.Counter(chapter)
self.campaign_chapter = counter.most_common()[0][0]
if self.campaign_chapter == 0 or self.campaign_chapter == '0':
# ['0F', 'F-IB', 'IGI']
raise CampaignNameError
# After OCR, recover button attributes.
# These buttons are ready to be stage entrances for `MapOperation.enter_map()`
# button.area: Area of stage name, such as 'CLEAR' and '%'.