1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-04-01 02:05:13 +00:00

Compare commits

..

No commits in common. "f92d92aec017913587519d8a3e75632976ebba93" and "84acb67061fdb32c9fe89b7fe383d593cdad6a49" have entirely different histories.

22 changed files with 135 additions and 61 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 6.2 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.6 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -34,17 +34,17 @@ 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),
), ),
zht=Button( zht=Button(
file='./assets/zht/cafe/CAFE_FIRST.png', file='./assets/zht/cafe/CAFE_FIRST.png',
area=(153, 93, 164, 109), area=(99, 155, 152, 176),
search=(133, 73, 184, 129), search=(79, 135, 172, 196),
color=(172, 180, 190), color=(131, 145, 161),
button=(153, 93, 164, 109), button=(99, 155, 152, 176),
), ),
) )
CAFE_INVITE = ButtonWrapper( CAFE_INVITE = ButtonWrapper(
@ -58,17 +58,17 @@ 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),
), ),
zht=Button( zht=Button(
file='./assets/zht/cafe/CAFE_INVITE.png', file='./assets/zht/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(
@ -82,17 +82,17 @@ 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),
), ),
zht=Button( zht=Button(
file='./assets/zht/cafe/CAFE_INVITED.png', file='./assets/zht/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(
@ -106,17 +106,65 @@ 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),
), ),
zht=Button( zht=Button(
file='./assets/zht/cafe/CAFE_SECOND.png', file='./assets/zht/cafe/CAFE_SECOND.png',
area=(153, 93, 162, 110), area=(239, 155, 293, 176),
search=(133, 73, 182, 130), search=(219, 135, 313, 196),
color=(169, 178, 189), color=(132, 145, 162),
button=(153, 93, 162, 110), button=(239, 155, 293, 176),
),
)
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),
),
zht=Button(
file='./assets/zht/cafe/CHANGE_CAFE_NOT_SELECTED.png',
area=(99, 91, 199, 112),
search=(79, 71, 219, 132),
color=(169, 177, 188),
button=(99, 91, 199, 112),
),
)
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),
),
zht=Button(
file='./assets/zht/cafe/CHANGE_CAFE_SELECTED.png',
area=(59, 90, 199, 112),
search=(39, 70, 219, 132),
color=(113, 132, 154),
button=(59, 90, 199, 112),
), ),
) )
CHECK_MOMOTALK = ButtonWrapper( CHECK_MOMOTALK = ButtonWrapper(
@ -154,17 +202,17 @@ 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),
), ),
zht=Button( zht=Button(
file='./assets/zht/cafe/CHECK_REWARD.png', file='./assets/zht/cafe/CHECK_REWARD.png',
area=(1125, 634, 1209, 651), area=(1087, 609, 1222, 644),
search=(1105, 614, 1229, 671), search=(1067, 589, 1242, 664),
color=(107, 128, 149), color=(70, 94, 120),
button=(1113, 626, 1237, 692), button=(1086, 613, 1229, 682),
), ),
) )
CLICKABLE_TEMPLATE = ButtonWrapper( CLICKABLE_TEMPLATE = ButtonWrapper(
@ -476,17 +524,17 @@ 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),
), ),
zht=Button( zht=Button(
file='./assets/zht/cafe/OCR_CAFE.png', file='./assets/zht/cafe/OCR_CAFE.png',
area=(1127, 657, 1219, 682), area=(1072, 639, 1232, 679),
search=(1107, 637, 1239, 702), search=(1052, 619, 1252, 699),
color=(93, 112, 134), color=(71, 93, 118),
button=(1127, 657, 1219, 682), button=(1072, 639, 1232, 679),
), ),
) )
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)
@ -140,19 +144,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)