From 62c147fdab131583c259a5dcdec0b80e27aff299 Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Wed, 22 Jan 2025 15:01:49 +0800 Subject: [PATCH] fix(cafe): adjust timer of Cafe No.2 --- tasks/cafe/cafe.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tasks/cafe/cafe.py b/tasks/cafe/cafe.py index 5aab18f..f98756f 100644 --- a/tasks/cafe/cafe.py +++ b/tasks/cafe/cafe.py @@ -109,7 +109,6 @@ class Cafe(CafeUI): status = CafeStatus.STUDENT_LIST loading_timer = Timer(2).start() action_timer = Timer(1, count=1) - is_list = False is_reset = False is_second = False is_enable = is_reward_on or is_touch_on @@ -126,11 +125,6 @@ class Cafe(CafeUI): if not loading_timer.reached(): continue - if not is_list and status == CafeStatus.STUDENT_LIST and self.appear(STUDENT_LIST): - is_list = True - loading_timer = Timer(3).start() - continue - if not is_reward_on and status == CafeStatus.OCR: logger.info('Skip reward') status = CafeStatus.CLICK @@ -159,9 +153,9 @@ class Cafe(CafeUI): case '2': logger.info('Cafe second arrived') status = CafeStatus.STUDENT_LIST - is_list = False is_second = True self.check = 0 + loading_timer.reset().start() else: if not SWITCH_CAFE.appear(main=self): logger.warning('Cafe switch not found') @@ -180,7 +174,6 @@ class Cafe(CafeUI): logger.info('Cafe second arrived') SWITCH_CAFE.set('off', main=self) status = CafeStatus.STUDENT_LIST - is_list = False is_second = True self.check = 0