1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-01-07 14:05:12 +00:00

Compare commits

..

No commits in common. "49c08942270b6aedbe9d583e70f5df8d8f700639" and "cae02d62ec11ed4ec2816e583f7faf1b700fa565" have entirely different histories.

13 changed files with 97 additions and 37 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -34,10 +34,10 @@ CAFE_FIRST = ButtonWrapper(
), ),
en=Button( en=Button(
file='./assets/en/cafe/CAFE_FIRST.png', file='./assets/en/cafe/CAFE_FIRST.png',
area=(205, 96, 215, 107), area=(100, 156, 148, 175),
search=(185, 76, 235, 127), search=(80, 136, 168, 195),
color=(176, 184, 194), color=(107, 123, 144),
button=(205, 96, 215, 107), button=(100, 156, 148, 175),
), ),
) )
CAFE_INVITE = ButtonWrapper( CAFE_INVITE = ButtonWrapper(
@ -51,10 +51,10 @@ CAFE_INVITE = ButtonWrapper(
), ),
en=Button( en=Button(
file='./assets/en/cafe/CAFE_INVITE.png', file='./assets/en/cafe/CAFE_INVITE.png',
area=(870, 637, 903, 663), area=(816, 635, 845, 655),
search=(850, 617, 923, 683), search=(796, 615, 865, 675),
color=(253, 217, 235), color=(173, 182, 192),
button=(870, 637, 903, 663), button=(816, 635, 845, 655),
), ),
) )
CAFE_INVITED = ButtonWrapper( CAFE_INVITED = ButtonWrapper(
@ -68,10 +68,10 @@ CAFE_INVITED = ButtonWrapper(
), ),
en=Button( en=Button(
file='./assets/en/cafe/CAFE_INVITED.png', file='./assets/en/cafe/CAFE_INVITED.png',
area=(870, 637, 903, 663), area=(815, 633, 847, 657),
search=(850, 617, 923, 683), search=(795, 613, 867, 677),
color=(111, 109, 109), color=(144, 144, 146),
button=(870, 637, 903, 663), button=(815, 633, 847, 657),
), ),
) )
CAFE_SECOND = ButtonWrapper( CAFE_SECOND = ButtonWrapper(
@ -85,10 +85,44 @@ CAFE_SECOND = ButtonWrapper(
), ),
en=Button( en=Button(
file='./assets/en/cafe/CAFE_SECOND.png', file='./assets/en/cafe/CAFE_SECOND.png',
area=(207, 96, 214, 107), area=(242, 157, 291, 174),
search=(187, 76, 234, 127), search=(222, 137, 311, 194),
color=(174, 182, 192), color=(119, 134, 153),
button=(207, 96, 214, 107), button=(242, 157, 291, 174),
),
)
CHANGE_CAFE_NOT_SELECTED = ButtonWrapper(
name='CHANGE_CAFE_NOT_SELECTED',
jp=Button(
file='./assets/jp/cafe/CHANGE_CAFE_NOT_SELECTED.png',
area=(84, 89, 178, 109),
search=(64, 69, 198, 129),
color=(185, 193, 203),
button=(84, 89, 178, 109),
),
en=Button(
file='./assets/en/cafe/CHANGE_CAFE_NOT_SELECTED.png',
area=(99, 93, 197, 110),
search=(79, 73, 217, 130),
color=(179, 187, 196),
button=(99, 93, 197, 110),
),
)
CHANGE_CAFE_SELECTED = ButtonWrapper(
name='CHANGE_CAFE_SELECTED',
jp=Button(
file='./assets/jp/cafe/CHANGE_CAFE_SELECTED.png',
area=(40, 87, 191, 112),
search=(20, 67, 211, 132),
color=(82, 105, 130),
button=(40, 87, 191, 112),
),
en=Button(
file='./assets/en/cafe/CHANGE_CAFE_SELECTED.png',
area=(57, 92, 199, 112),
search=(37, 72, 219, 132),
color=(92, 115, 140),
button=(57, 92, 199, 112),
), ),
) )
CHECK_MOMOTALK = ButtonWrapper( CHECK_MOMOTALK = ButtonWrapper(
@ -119,10 +153,10 @@ CHECK_REWARD = ButtonWrapper(
), ),
en=Button( en=Button(
file='./assets/en/cafe/CHECK_REWARD.png', file='./assets/en/cafe/CHECK_REWARD.png',
area=(1116, 636, 1218, 654), area=(1090, 613, 1229, 644),
search=(1096, 616, 1238, 674), search=(1070, 593, 1249, 664),
color=(77, 100, 125), color=(64, 88, 115),
button=(1113, 625, 1239, 692), button=(1086, 611, 1229, 685),
), ),
) )
CLICKABLE_TEMPLATE = ButtonWrapper( CLICKABLE_TEMPLATE = ButtonWrapper(
@ -350,10 +384,10 @@ OCR_CAFE = ButtonWrapper(
), ),
en=Button( en=Button(
file='./assets/en/cafe/OCR_CAFE.png', file='./assets/en/cafe/OCR_CAFE.png',
area=(1127, 657, 1219, 682), area=(1105, 639, 1195, 674),
search=(1107, 637, 1239, 702), search=(1085, 619, 1215, 694),
color=(93, 112, 134), color=(84, 104, 127),
button=(1127, 657, 1219, 682), button=(1105, 639, 1195, 674),
), ),
) )
OCR_NAME = ButtonWrapper( OCR_NAME = ButtonWrapper(

View File

@ -8,6 +8,10 @@ from tasks.cafe.assets.assets_cafe import *
from tasks.cafe.invitation import handle_invitation from tasks.cafe.invitation import handle_invitation
from tasks.cafe.ui import CafeUI from tasks.cafe.ui import CafeUI
SWITCH_CAFE = Switch('Cafe_switch')
SWITCH_CAFE.add_state('off', CHANGE_CAFE_NOT_SELECTED)
SWITCH_CAFE.add_state('on', CHANGE_CAFE_SELECTED)
SWITCH_CAFE_SELECT = Switch('Cafe_switch_select') SWITCH_CAFE_SELECT = Switch('Cafe_switch_select')
SWITCH_CAFE_SELECT.add_state('1', CAFE_FIRST) SWITCH_CAFE_SELECT.add_state('1', CAFE_FIRST)
SWITCH_CAFE_SELECT.add_state('2', CAFE_SECOND) SWITCH_CAFE_SELECT.add_state('2', CAFE_SECOND)
@ -137,19 +141,41 @@ 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:
if not SWITCH_CAFE_SELECT.appear(main=self): # handle new jp ui
logger.info('Cafe switch not found') if self.config.Emulator_GameLanguage == 'jp':
continue if not SWITCH_CAFE_SELECT.appear(main=self):
match SWITCH_CAFE_SELECT.get(main=self): logger.info('Cafe switch not found')
case '1': continue
if self.click_with_interval(CAFE_FIRST): match SWITCH_CAFE_SELECT.get(main=self):
continue case '1':
case '2': if self.click_with_interval(CAFE_FIRST):
logger.info('Cafe second arrived') continue
status = CafeStatus.STUDENT_LIST case '2':
is_second = True logger.info('Cafe second arrived')
self.check = 0 status = CafeStatus.STUDENT_LIST
loading_timer.reset().start() is_second = True
self.check = 0
loading_timer.reset().start()
else:
if not SWITCH_CAFE.appear(main=self):
logger.warning('Cafe switch not found')
continue
if SWITCH_CAFE.get(main=self) == 'off':
SWITCH_CAFE.set('on', main=self)
logger.info('Switching to second cafe')
if not SWITCH_CAFE_SELECT.appear(main=self):
logger.info('Cafe switch select not found')
continue
match SWITCH_CAFE_SELECT.get(main=self):
case '1':
if self.click_with_interval(CAFE_SECOND):
continue
case '2':
logger.info('Cafe second arrived')
SWITCH_CAFE.set('off', main=self)
status = CafeStatus.STUDENT_LIST
is_second = True
self.check = 0
if action_timer.reached_and_reset(): if action_timer.reached_and_reset():
logger.attr('Status', status) logger.attr('Status', status)