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

Add: [TW] OpSi zone name detection

This commit is contained in:
LmeSzinc
2021-11-14 15:08:11 +08:00
parent e25577f71f
commit 72c96de596

View File

@@ -64,6 +64,15 @@ class OSMapOperation(MapOrderHandler, MissionHandler, PortHandler, StorageHandle
name = name.replace('', '').replace('', '').replace('', '')
return name
@Config.when(SERVER='tw')
def get_zone_name(self):
# For JP only
ocr = Ocr(MAP_NAME, lang='tw', letter=(214, 231, 255), threshold=127, name='OCR_OS_MAP_NAME')
name = ocr.ocr(self.device.image)
# Remove '安全海域' or '隱秘海域' at the end of tw ocr.
name = name.rstrip('安全海域隱秘海域一')
return name
@Config.when(SERVER=None)
def get_zone_name(self):
# For CN only