Add option to skip prepare route

This commit is contained in:
王鹏
2026-05-12 17:21:14 +08:00
parent 2a4684e700
commit d01b2cb9c2
2 changed files with 15 additions and 0 deletions

View File

@@ -259,6 +259,7 @@ class AutoBotMove:
turn_error_hold_sec=None,
distance_interact_pause_sec=None,
mailbox_route_path=None,
skip_prepare_route=False,
):
self.last_tab_time = 0
self.last_interaction_time = 0 # 记录上一次按互动键的时间
@@ -289,6 +290,7 @@ class AutoBotMove:
self.distance_interact_brake_sec = 0.08
self._last_mouse_path_scale_signature = None
self.logistics_resume_cooldown_until = 0.0
self.skip_prepare_route = bool(skip_prepare_route)
# stop_check: 返回 True 表示需要立即停止(用于中断阻塞中的后勤/路线导航)
self._stop_check = stop_check if callable(stop_check) else (lambda: False)
@@ -328,6 +330,10 @@ class AutoBotMove:
except Exception:
self.prepare_route_waypoints = []
print(f">>> [准备路线] 加载失败,忽略配置: {prepare_route_path}")
if self.skip_prepare_route:
if self.prepare_route_waypoints:
print(">>> [准备路线] 已勾选跳过准备路线,直接开始巡逻。")
self.prepare_route_waypoints = []
self.prepare_route_index = 0
self.prepare_route_completed = not bool(self.prepare_route_waypoints)
self.is_running_prepare_route = bool(self.prepare_route_waypoints)