mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2025-12-16 22:05:12 +00:00
Compare commits
3 Commits
bea794386c
...
79ea59d60c
| Author | SHA1 | Date | |
|---|---|---|---|
| 79ea59d60c | |||
| d53e280bfc | |||
| 0b2487487b |
@ -133,13 +133,14 @@ class Cafe(UI):
|
||||
if self.appear_then_click(CHECK_REWARD):
|
||||
return CafeStatus.REWARD
|
||||
case CafeStatus.REWARD:
|
||||
if not self.appear(GET_REWARD):
|
||||
self.click_with_interval(CHECK_REWARD, interval=6)
|
||||
return status
|
||||
if self.match_color(GOT_REWARD):
|
||||
self.device.click(GET_REWARD_CLOSE)
|
||||
return CafeStatus.GOT
|
||||
if not self.appear(GET_REWARD):
|
||||
return CafeStatus.OCR
|
||||
if self.match_color(GET_REWARD):
|
||||
self.device.click(GET_REWARD)
|
||||
self.click_with_interval(GET_REWARD)
|
||||
case CafeStatus.GOT:
|
||||
logger.info('Cafe reward have been got')
|
||||
self.appear_then_click(GET_REWARD_CLOSE)
|
||||
@ -151,7 +152,7 @@ class Cafe(UI):
|
||||
logger.attr('Clickable', self.click)
|
||||
if not buttons:
|
||||
return CafeStatus.CHECK
|
||||
self.device.click(buttons[0])
|
||||
self.click_with_interval(buttons[0], interval=1)
|
||||
case CafeStatus.CHECK:
|
||||
buttons = self._get_clickable_buttons()
|
||||
if not self.is_adjust_on:
|
||||
@ -194,7 +195,6 @@ class Cafe(UI):
|
||||
status = CafeStatus.STUDENT_LIST
|
||||
loading_timer = Timer(2).start()
|
||||
action_timer = Timer(1.5, count=1) # cant be too fast
|
||||
check_timer = Timer(1, count=1)
|
||||
is_list = False
|
||||
is_reset = False
|
||||
is_second = False
|
||||
@ -253,12 +253,9 @@ class Cafe(UI):
|
||||
is_reset = True
|
||||
continue
|
||||
|
||||
if status == CafeStatus.CHECK and not check_timer.reached_and_reset():
|
||||
continue
|
||||
|
||||
if action_timer.reached_and_reset():
|
||||
status = self._handle_cafe(status)
|
||||
logger.attr('Status', status)
|
||||
status = self._handle_cafe(status)
|
||||
|
||||
if not is_second_cafe_on:
|
||||
if status is CafeStatus.FINISHED:
|
||||
|
||||
@ -47,8 +47,8 @@ class Circle(UI):
|
||||
status = CircleStatus.GOT
|
||||
|
||||
if action_timer.reached_and_reset():
|
||||
status = self._handle_circle(status)
|
||||
logger.attr('Status', status)
|
||||
status = self._handle_circle(status)
|
||||
|
||||
if status is CircleStatus.FINISHED:
|
||||
break
|
||||
|
||||
@ -146,8 +146,8 @@ class TacticalChallenge(UI):
|
||||
if not ui_timer.reached():
|
||||
continue
|
||||
if action_timer.reached_and_reset():
|
||||
status = self._handle_challenge(status)
|
||||
logger.attr('Status', status.name)
|
||||
status = self._handle_challenge(status)
|
||||
if status in (TCStatus.FINAL, TCStatus.FINISHED):
|
||||
break
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user