add 巡逻模式优先上马

This commit is contained in:
王鹏
2026-03-23 09:50:08 +08:00
parent be436b66a7
commit f517c29579
20 changed files with 233 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ import sys
import time
import pydirectinput
from game_state import parse_game_state
from game_state import parse_game_state, load_layout_config
from coordinate_patrol import CoordinatePatrol
from death_manager import DeathManager
from logistics_manager import LogisticsManager
@@ -91,7 +91,13 @@ class AutoBotMove:
if waypoints is None:
path = waypoints_path or get_config_path(WAYPOINTS_FILE)
waypoints = load_waypoints(path) or DEFAULT_WAYPOINTS
self.patrol_controller = CoordinatePatrol(waypoints)
layout = load_layout_config()
self.patrol_controller = CoordinatePatrol(
waypoints,
mount_key=str(layout.get("mount_key", "x") or "x"),
mount_hold_sec=float(layout.get("mount_hold_sec", 1.6)),
mount_retry_after_sec=float(layout.get("mount_retry_after_sec", 2.0)),
)
self.death_manager = DeathManager(self.patrol_controller)
vendor_file = vendor_path or get_config_path('vendor.json')
self.logistics_manager = LogisticsManager(vendor_file)