Compare commits
3 Commits
2adf3f9efe
...
9a500b9191
| Author | SHA1 | Date | |
|---|---|---|---|
| 9a500b9191 | |||
| 180fa6aa7d | |||
| 4325118562 |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 6.7 KiB |
@ -27,10 +27,10 @@ CAFE_FIRST = ButtonWrapper(
|
||||
name='CAFE_FIRST',
|
||||
jp=Button(
|
||||
file='./assets/jp/cafe/CAFE_FIRST.png',
|
||||
area=(82, 152, 136, 175),
|
||||
search=(62, 132, 156, 195),
|
||||
color=(111, 127, 147),
|
||||
button=(82, 152, 136, 175),
|
||||
area=(96, 92, 111, 110),
|
||||
search=(76, 72, 131, 130),
|
||||
color=(185, 192, 200),
|
||||
button=(96, 92, 111, 110),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/cafe/CAFE_FIRST.png',
|
||||
@ -51,10 +51,10 @@ CAFE_INVITE = ButtonWrapper(
|
||||
name='CAFE_INVITE',
|
||||
jp=Button(
|
||||
file='./assets/jp/cafe/CAFE_INVITE.png',
|
||||
area=(816, 635, 845, 655),
|
||||
search=(796, 615, 865, 675),
|
||||
color=(173, 182, 192),
|
||||
button=(816, 635, 845, 655),
|
||||
area=(870, 637, 903, 663),
|
||||
search=(850, 617, 923, 683),
|
||||
color=(253, 217, 235),
|
||||
button=(870, 637, 903, 663),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/cafe/CAFE_INVITE.png',
|
||||
@ -75,10 +75,10 @@ CAFE_INVITED = ButtonWrapper(
|
||||
name='CAFE_INVITED',
|
||||
jp=Button(
|
||||
file='./assets/jp/cafe/CAFE_INVITED.png',
|
||||
area=(815, 633, 847, 657),
|
||||
search=(795, 613, 867, 677),
|
||||
color=(144, 144, 146),
|
||||
button=(815, 633, 847, 657),
|
||||
area=(870, 637, 903, 663),
|
||||
search=(850, 617, 923, 683),
|
||||
color=(111, 109, 109),
|
||||
button=(870, 637, 903, 663),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/cafe/CAFE_INVITED.png',
|
||||
@ -99,10 +99,10 @@ CAFE_SECOND = ButtonWrapper(
|
||||
name='CAFE_SECOND',
|
||||
jp=Button(
|
||||
file='./assets/jp/cafe/CAFE_SECOND.png',
|
||||
area=(219, 152, 279, 175),
|
||||
search=(199, 132, 299, 195),
|
||||
color=(110, 126, 146),
|
||||
button=(219, 152, 279, 175),
|
||||
area=(99, 92, 108, 110),
|
||||
search=(79, 72, 128, 130),
|
||||
color=(193, 200, 209),
|
||||
button=(99, 92, 108, 110),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/cafe/CAFE_SECOND.png',
|
||||
@ -195,10 +195,10 @@ CHECK_REWARD = ButtonWrapper(
|
||||
name='CHECK_REWARD',
|
||||
jp=Button(
|
||||
file='./assets/jp/cafe/CHECK_REWARD.png',
|
||||
area=(1095, 621, 1146, 637),
|
||||
search=(1075, 601, 1166, 657),
|
||||
color=(82, 105, 129),
|
||||
button=(1086, 607, 1225, 685),
|
||||
area=(1120, 635, 1166, 651),
|
||||
search=(1100, 615, 1186, 671),
|
||||
color=(79, 102, 127),
|
||||
button=(1109, 627, 1239, 691),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/cafe/CHECK_REWARD.png',
|
||||
@ -517,10 +517,10 @@ OCR_CAFE = ButtonWrapper(
|
||||
name='OCR_CAFE',
|
||||
jp=Button(
|
||||
file='./assets/jp/cafe/OCR_CAFE.png',
|
||||
area=(1103, 642, 1202, 672),
|
||||
search=(1083, 622, 1222, 692),
|
||||
color=(87, 107, 129),
|
||||
button=(1103, 642, 1202, 672),
|
||||
area=(1127, 657, 1219, 682),
|
||||
search=(1107, 637, 1239, 702),
|
||||
color=(93, 112, 134),
|
||||
button=(1127, 657, 1219, 682),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/cafe/OCR_CAFE.png',
|
||||
|
||||
@ -150,6 +150,22 @@ class Cafe(CafeUI):
|
||||
continue
|
||||
|
||||
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):
|
||||
logger.warning('Cafe switch not found')
|
||||
continue
|
||||
@ -159,7 +175,7 @@ class Cafe(CafeUI):
|
||||
if not SWITCH_CAFE_SELECT.appear(main=self):
|
||||
logger.info('Cafe switch select not found')
|
||||
continue
|
||||
match (SWITCH_CAFE_SELECT.get(main=self)):
|
||||
match SWITCH_CAFE_SELECT.get(main=self):
|
||||
case '1':
|
||||
if self.click_with_interval(CAFE_SECOND):
|
||||
continue
|
||||
|
||||
@ -6,7 +6,7 @@ import numpy as np
|
||||
|
||||
from module.base.base import ModuleBase
|
||||
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.logger import logger
|
||||
from module.ocr.ocr import Ocr
|
||||
@ -223,7 +223,7 @@ def handle_invitation_status(status: InvitationStatus, main: ModuleBase) -> Invi
|
||||
if not invitation.is_invitation:
|
||||
logger.info('Invitation waiting until next refresh')
|
||||
return InvitationStatus.FINISHED
|
||||
if main.appear(CAFE_INVITED):
|
||||
if main.match_color(CAFE_INVITED):
|
||||
logger.info('Invitation in cooldown')
|
||||
return InvitationStatus.FINISHED
|
||||
if invitation.choice != 'list_top' and invitation.target_name is None:
|
||||
|
||||