1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2025-12-16 22:05:12 +00:00

fix: improve cafe performance and stability

This commit is contained in:
YoursFunny 2023-11-03 21:47:08 +08:00
parent 75e6417620
commit 57c0ed8531
Signed by: YoursFunny
GPG Key ID: 207EDC3CD5B40F9C

View File

@ -133,6 +133,7 @@ class Cafe(UI):
case CafeStatus.GOT: case CafeStatus.GOT:
logger.info('Cafe reward have been got') logger.info('Cafe reward have been got')
self.appear_then_click(GET_REWARD_CLOSE) self.appear_then_click(GET_REWARD_CLOSE)
if not self.appear(GET_REWARD_CLOSE):
return CafeStatus.CLICK return CafeStatus.CLICK
case CafeStatus.CLICK: case CafeStatus.CLICK:
buttons = self._get_clickable_buttons(offset=(45, 10)) buttons = self._get_clickable_buttons(offset=(45, 10))
@ -198,7 +199,7 @@ class Cafe(UI):
if not is_list and status == CafeStatus.STUDENT_LIST and self.appear(STUDENT_LIST): if not is_list and status == CafeStatus.STUDENT_LIST and self.appear(STUDENT_LIST):
is_list = True is_list = True
loading_timer = Timer(5).start() loading_timer = Timer(4).start()
continue continue
if not is_reward_on and status == CafeStatus.OCR: if not is_reward_on and status == CafeStatus.OCR: