1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-22 06:59:28 +08:00

Fix: Merge error causing Ocr failure

This commit is contained in:
Zuosizhu
2024-10-27 13:25:40 +08:00
parent 07d61ec68b
commit 47608ccfb2

View File

@@ -12,13 +12,13 @@ from module.base.utils import color_similar, get_color
from module.logger import logger
from module.ocr.ocr import Digit, Ocr
from module.ui.ui import UI
if server.server != 'jp':
OCR_COIN = Digit(OCR_COIN, name='OCR_COIN', letter=(239, 239, 239), threshold=128)
else:
OCR_COIN = Digit(OCR_COIN, name='OCR_COIN', letter=(201, 201, 201), threshold=128)
from module.log_res.log_res import LogRes
#if server.server != 'jp':
# OCR_COIN = Digit(OCR_COIN, name='OCR_COIN', letter=(239, 239, 239), threshold=128)
#else:
# OCR_COIN = Digit(OCR_COIN, name='OCR_COIN', letter=(201, 201, 201), threshold=128)
class PtOcr(Ocr):
def __init__(self, *args, **kwargs):
@@ -120,7 +120,10 @@ class CampaignStatus(UI):
color = get_color(self.device.image, OCR_OIL_CHECK.button)
if color_similar(color, OCR_OIL_CHECK.color):
# Original color
ocr = Digit(_button, name=name, letter=(247, 247, 247), threshold=128)
if server.server != 'jp':
ocr = Digit(_button, name=name, letter=(247, 247, 247), threshold=128)
else:
ocr = Digit(_button, name=name, letter=(201, 201, 201), threshold=128)
elif color_similar(color, (59, 59, 64)):
# With black overlay
ocr = Digit(_button, name=name, letter=(165, 165, 165), threshold=128)