mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-02-06 19:45:14 +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_left = (-width * r, 0)
|
||||||
vector_right = (width * r, 0)
|
vector_right = (width * r, 0)
|
||||||
random_r = (-5, -5, 5, 5)
|
random_r = (-5, -5, 5, 5)
|
||||||
name = 'CAFE_SWIPE'
|
|
||||||
match direction:
|
match direction:
|
||||||
case 'init':
|
case 'init':
|
||||||
self.device.pinch()
|
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_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, name=name)
|
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, name=name)
|
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, name=name)
|
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5)
|
||||||
case 'left':
|
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)
|
||||||
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)
|
||||||
case 'right':
|
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)
|
||||||
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)
|
||||||
# solve too much swipe causing restart
|
# solve too much swipe causing restart
|
||||||
self.device.click_record_remove(name)
|
self.device.click_record_clear()
|
||||||
|
|
||||||
def cafe_additional(self) -> bool:
|
def cafe_additional(self) -> bool:
|
||||||
if self.appear_then_click(INVENTORY):
|
if self.appear_then_click(INVENTORY):
|
||||||
|
|||||||
@ -107,13 +107,7 @@ class StageList:
|
|||||||
self.load_stage_indexes(main=main)
|
self.load_stage_indexes(main=main)
|
||||||
|
|
||||||
if self.current_index_min <= index <= self.current_index_max:
|
if self.current_index_min <= index <= self.current_index_max:
|
||||||
return True
|
break
|
||||||
|
|
||||||
indexes = self._indexes
|
|
||||||
if indexes and last_indexes == set(indexes):
|
|
||||||
logger.warning(f'No more index {index}')
|
|
||||||
return False
|
|
||||||
last_indexes = set(indexes)
|
|
||||||
|
|
||||||
if index < self.current_index_min:
|
if index < self.current_index_min:
|
||||||
self.swipe_page(self.swipe_direction, main, reverse=True)
|
self.swipe_page(self.swipe_direction, main, reverse=True)
|
||||||
@ -126,6 +120,14 @@ class StageList:
|
|||||||
timeout=Timer(1.5, 5)
|
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(
|
def select_index_enter(
|
||||||
self,
|
self,
|
||||||
main: ModuleBase,
|
main: ModuleBase,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user