1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-09 18:39:04 +08:00

Fix: [CN] Remove more dash-like characters (fixed #5522)

This commit is contained in:
LmeSzinc 2026-02-19 03:13:43 +08:00
parent a538739910
commit c014140c6e

View File

@ -47,7 +47,7 @@ class OSMapOperation(MapOrderHandler, MissionHandler, PortHandler, StorageHandle
name = ocr.ocr(self.device.image)
name = "".join(name.split())
name = name.lower()
name = name.strip('\\/-')
name = name.strip('\\/-—–-')
if '-' in name:
name = name.split('-')[0]
if 'é' in name: # Méditerranée name maps
@ -80,7 +80,7 @@ class OSMapOperation(MapOrderHandler, MissionHandler, PortHandler, StorageHandle
# For JP only
ocr = Ocr(MAP_NAME, lang='jp', letter=(157, 173, 192), threshold=127, name='OCR_OS_MAP_NAME')
name = ocr.ocr(self.device.image)
name = name.strip('\\/-')
name = name.strip('\\/-—–-')
self.is_zone_name_hidden = '安全' in name
# Remove punctuations
for char in '':
@ -109,7 +109,7 @@ class OSMapOperation(MapOrderHandler, MissionHandler, PortHandler, StorageHandle
# For TW only
ocr = Ocr(MAP_NAME, lang='tw', letter=(198, 215, 239), threshold=127, name='OCR_OS_MAP_NAME')
name = ocr.ocr(self.device.image)
name = name.strip('\\/-')
name = name.strip('\\/-—–-')
self.is_zone_name_hidden = '安全' in name
# Remove '塞壬要塞海域'
if '' in name:
@ -123,7 +123,7 @@ class OSMapOperation(MapOrderHandler, MissionHandler, PortHandler, StorageHandle
# For CN only
ocr = Ocr(MAP_NAME, lang='cnocr', letter=(214, 231, 255), threshold=127, name='OCR_OS_MAP_NAME')
name = ocr.ocr(self.device.image)
name = name.strip('\\/-')
name = name.strip('\\/-—–-')
self.is_zone_name_hidden = '安全' in name
if '-' in name:
name = name.split('-')[0]