mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-23 17:55:56 +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)
|
counter = collections.Counter(chapter)
|
||||||
self.campaign_chapter = counter.most_common()[0][0]
|
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.
|
# After OCR, recover button attributes.
|
||||||
# These buttons are ready to be stage entrances for `MapOperation.enter_map()`
|
# These buttons are ready to be stage entrances for `MapOperation.enter_map()`
|
||||||
# button.area: Area of stage name, such as 'CLEAR' and '%'.
|
# button.area: Area of stage name, such as 'CLEAR' and '%'.
|
||||||
|
|||||||
Reference in New Issue
Block a user