mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2025-12-16 22:05:12 +00:00
fix(cafe): adjust handle sequence
This commit is contained in:
parent
a20411071c
commit
a05c4e8f2f
@ -209,27 +209,6 @@ class Cafe(UI):
|
|||||||
if self.ui_additional():
|
if self.ui_additional():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if is_second_cafe_on and not is_second and status == CafeStatus.FINISHED:
|
|
||||||
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')
|
|
||||||
status = CafeStatus.STUDENT_LIST
|
|
||||||
is_list = False
|
|
||||||
is_second = True
|
|
||||||
self.check = 0
|
|
||||||
|
|
||||||
if not loading_timer.reached():
|
if not loading_timer.reached():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -253,6 +232,28 @@ class Cafe(UI):
|
|||||||
is_reset = True
|
is_reset = True
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if is_second_cafe_on and not is_second and status == CafeStatus.FINISHED:
|
||||||
|
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_list = False
|
||||||
|
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)
|
||||||
status = self._handle_cafe(status)
|
status = self._handle_cafe(status)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user