mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2025-12-16 15:35:12 +00:00
fix(cafe): update latest Cafe No.2 switch for jp
This commit is contained in:
parent
2adf3f9efe
commit
4325118562
@ -150,6 +150,22 @@ class Cafe(CafeUI):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if self.is_second_cafe_on and not is_second and status == CafeStatus.FINISHED:
|
if self.is_second_cafe_on and not is_second and status == CafeStatus.FINISHED:
|
||||||
|
# handle new jp ui
|
||||||
|
if self.config.Emulator_GameLanguage == 'jp':
|
||||||
|
if not SWITCH_CAFE_SELECT.appear(main=self):
|
||||||
|
logger.info('Cafe switch not found')
|
||||||
|
continue
|
||||||
|
match SWITCH_CAFE_SELECT.get(main=self):
|
||||||
|
case '1':
|
||||||
|
if self.click_with_interval(CAFE_FIRST):
|
||||||
|
continue
|
||||||
|
case '2':
|
||||||
|
logger.info('Cafe second arrived')
|
||||||
|
status = CafeStatus.STUDENT_LIST
|
||||||
|
is_list = False
|
||||||
|
is_second = True
|
||||||
|
self.check = 0
|
||||||
|
else:
|
||||||
if not SWITCH_CAFE.appear(main=self):
|
if not SWITCH_CAFE.appear(main=self):
|
||||||
logger.warning('Cafe switch not found')
|
logger.warning('Cafe switch not found')
|
||||||
continue
|
continue
|
||||||
@ -159,7 +175,7 @@ class Cafe(CafeUI):
|
|||||||
if not SWITCH_CAFE_SELECT.appear(main=self):
|
if not SWITCH_CAFE_SELECT.appear(main=self):
|
||||||
logger.info('Cafe switch select not found')
|
logger.info('Cafe switch select not found')
|
||||||
continue
|
continue
|
||||||
match (SWITCH_CAFE_SELECT.get(main=self)):
|
match SWITCH_CAFE_SELECT.get(main=self):
|
||||||
case '1':
|
case '1':
|
||||||
if self.click_with_interval(CAFE_SECOND):
|
if self.click_with_interval(CAFE_SECOND):
|
||||||
continue
|
continue
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import numpy as np
|
|||||||
|
|
||||||
from module.base.base import ModuleBase
|
from module.base.base import ModuleBase
|
||||||
from module.base.timer import Timer
|
from module.base.timer import Timer
|
||||||
from module.base.utils import area_size, area_offset
|
from module.base.utils import area_offset, area_size
|
||||||
from module.config.utils import get_server_next_update
|
from module.config.utils import get_server_next_update
|
||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
from module.ocr.ocr import Ocr
|
from module.ocr.ocr import Ocr
|
||||||
@ -223,7 +223,7 @@ def handle_invitation_status(status: InvitationStatus, main: ModuleBase) -> Invi
|
|||||||
if not invitation.is_invitation:
|
if not invitation.is_invitation:
|
||||||
logger.info('Invitation waiting until next refresh')
|
logger.info('Invitation waiting until next refresh')
|
||||||
return InvitationStatus.FINISHED
|
return InvitationStatus.FINISHED
|
||||||
if main.appear(CAFE_INVITED):
|
if main.match_color(CAFE_INVITED):
|
||||||
logger.info('Invitation in cooldown')
|
logger.info('Invitation in cooldown')
|
||||||
return InvitationStatus.FINISHED
|
return InvitationStatus.FINISHED
|
||||||
if invitation.choice != 'list_top' and invitation.target_name is None:
|
if invitation.choice != 'list_top' and invitation.target_name is None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user