1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 14:27:00 +08:00
This commit is contained in:
GH Action - Upstream Sync
2026-02-18 20:51:23 +00:00
6 changed files with 67 additions and 49 deletions

View File

@@ -57,7 +57,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
@@ -90,7 +90,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 '':
@@ -119,7 +119,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:
@@ -133,7 +133,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]