Skip to content

Commit 844d959

Browse files
committed
优化
1 parent 59b9961 commit 844d959

3 files changed

Lines changed: 21 additions & 54 deletions

File tree

src/tasks/Auto65ArtifactTask_Fast.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -130,38 +130,6 @@ def do_run(self):
130130
# 短暂休眠
131131
self.sleep(0.2)
132132

133-
def reset_and_transport(self):
134-
"""
135-
搬运自70皎皎币的重置位置方法
136-
"""
137-
self.open_in_mission_menu()
138-
self.sleep(0.8)
139-
self.wait_until(
140-
lambda: self.find_next_hint(0.05, 0.01, 0.09, 0.05, r"设置"),
141-
post_action=self.click(0.73, 0.92, after_sleep=0.5),
142-
time_out=2,
143-
)
144-
self.wait_until(
145-
lambda: self.find_next_hint(0.06, 0.29, 0.12, 0.33, r"重置位置"),
146-
post_action=self.click(0.35, 0.03, after_sleep=0.5),
147-
time_out=2,
148-
)
149-
self.wait_until(
150-
lambda: self.find_next_hint(0.57, 0.54, 0.62, 0.58, r"确定"),
151-
post_action=lambda: (
152-
self.move_mouse_to_safe_position(),
153-
self.click(0.60, 0.32),
154-
self.move_back_from_safe_position(),
155-
self.sleep(1),
156-
),
157-
time_out=4,
158-
)
159-
self.wait_until(
160-
self.in_team,
161-
post_action=self.click(0.59, 0.56, after_sleep=0.5),
162-
time_out=2,
163-
)
164-
165133
def walk_to_aim(self):
166134
"""
167135
从起点走到目标位置的路径

src/tasks/Auto70jjbTask.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -131,28 +131,6 @@ def wait_hint(self, x1, y1, x2, y2, hint, timeout=2):
131131
self.sleep(0.2)
132132
return True
133133
return False
134-
135-
def reset_and_transport(self):
136-
self.open_in_mission_menu()
137-
self.sleep(0.8)
138-
self.wait_until(lambda: self.find_next_hint(0.05, 0.01, 0.09, 0.05, r'设置'),
139-
post_action=self.click(0.73, 0.92, after_sleep=0.5),
140-
time_out=2)
141-
self.wait_until(lambda: self.find_next_hint(0.06, 0.29, 0.12, 0.33, r'重置位置'),
142-
post_action=self.click(0.35, 0.03, after_sleep=0.5),
143-
time_out=2)
144-
self.wait_until(lambda: self.find_next_hint(0.57, 0.54, 0.62, 0.58, r'确定'),
145-
post_action=lambda: (
146-
self.move_mouse_to_safe_position(),
147-
self.click(0.60, 0.32),
148-
self.move_back_from_safe_position(),
149-
self.sleep(1)
150-
),
151-
time_out=4)
152-
self.wait_until(self.in_team,
153-
post_action=self.click(0.59, 0.56, after_sleep=0.5),
154-
time_out=2)
155-
156134

157135
def walk_to_aim(self):
158136
if self.find_next_hint(0.18,0.52,0.23,0.55,r'保护目标'):

src/tasks/CommissionsTask.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,27 @@ def find_next_hint(self, x1, y1, x2, y2, s, box_name="hint_text"):
335335
fps_text = find_boxes_by_name(texts, re.compile(s, re.IGNORECASE))
336336
if fps_text:
337337
return True
338+
339+
def reset_and_transport(self):
340+
self.open_in_mission_menu()
341+
self.sleep(0.8)
342+
self.wait_until(lambda: self.find_next_hint(0.05, 0.01, 0.09, 0.05, r'设置'),
343+
post_action=self.click(0.73, 0.92, after_sleep=0.5),
344+
time_out=2)
345+
self.wait_until(lambda: self.find_next_hint(0.06, 0.29, 0.12, 0.33, r'重置位置'),
346+
post_action=self.click(0.35, 0.03, after_sleep=0.5),
347+
time_out=2)
348+
self.wait_until(lambda: self.find_next_hint(0.57, 0.54, 0.62, 0.58, r'确定'),
349+
post_action=lambda: (
350+
self.move_mouse_to_safe_position(),
351+
self.click(0.60, 0.32),
352+
self.move_back_from_safe_position(),
353+
self.sleep(1)
354+
),
355+
time_out=4)
356+
self.wait_until(self.in_team,
357+
post_action=self.click(0.59, 0.56, after_sleep=0.5),
358+
time_out=2)
338359

339360

340361
class QuickMoveTask:

0 commit comments

Comments
 (0)