mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 09:48:20 +08:00
Fix: Handle campaign name OCR result started with 0
This commit is contained in:
@@ -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 '%'.
|
||||
|
||||
Reference in New Issue
Block a user