mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-02-06 11:05:12 +00:00
Compare commits
No commits in common. "8d83ec16577663fab0b68bfab52337a3eb9fa57e" and "54aa1bafb53140847a23820b562a3e1285e7b39d" have entirely different histories.
8d83ec1657
...
54aa1bafb5
@ -48,22 +48,21 @@ class CafeUI(UI):
|
||||
vector_left = (-width * r, 0)
|
||||
vector_right = (width * r, 0)
|
||||
random_r = (-5, -5, 5, 5)
|
||||
name = 'CAFE_SWIPE'
|
||||
match direction:
|
||||
case 'init':
|
||||
self.device.pinch()
|
||||
self.device.swipe_vector(vector_down, box=BOX_CAFE.area, random_range=random_r, padding=5, name=name)
|
||||
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5, name=name)
|
||||
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5, name=name)
|
||||
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5, name=name)
|
||||
self.device.swipe_vector(vector_down, box=BOX_CAFE.area, random_range=random_r, padding=5)
|
||||
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
|
||||
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5)
|
||||
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5)
|
||||
case 'left':
|
||||
self.device.swipe_vector(vector_left, box=BOX_CAFE.area, random_range=random_r, padding=5, name=name)
|
||||
self.device.swipe_vector(vector_left, box=BOX_CAFE.area, random_range=random_r, padding=5, name=name)
|
||||
self.device.swipe_vector(vector_left, box=BOX_CAFE.area, random_range=random_r, padding=5)
|
||||
self.device.swipe_vector(vector_left, box=BOX_CAFE.area, random_range=random_r, padding=5)
|
||||
case 'right':
|
||||
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5, name=name)
|
||||
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5, name=name)
|
||||
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
|
||||
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
|
||||
# solve too much swipe causing restart
|
||||
self.device.click_record_remove(name)
|
||||
self.device.click_record_clear()
|
||||
|
||||
def cafe_additional(self) -> bool:
|
||||
if self.appear_then_click(INVENTORY):
|
||||
|
||||
@ -107,13 +107,7 @@ class StageList:
|
||||
self.load_stage_indexes(main=main)
|
||||
|
||||
if self.current_index_min <= index <= self.current_index_max:
|
||||
return True
|
||||
|
||||
indexes = self._indexes
|
||||
if indexes and last_indexes == set(indexes):
|
||||
logger.warning(f'No more index {index}')
|
||||
return False
|
||||
last_indexes = set(indexes)
|
||||
break
|
||||
|
||||
if index < self.current_index_min:
|
||||
self.swipe_page(self.swipe_direction, main, reverse=True)
|
||||
@ -126,6 +120,14 @@ class StageList:
|
||||
timeout=Timer(1.5, 5)
|
||||
)
|
||||
|
||||
indexes = self._indexes
|
||||
if indexes and last_indexes == set(indexes):
|
||||
logger.warning(f'No more index {index}')
|
||||
return False
|
||||
last_indexes = set(indexes)
|
||||
|
||||
return True
|
||||
|
||||
def select_index_enter(
|
||||
self,
|
||||
main: ModuleBase,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user