From 2420e84d82cc1afdafc70882e51d4482dcdaad5b Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 14 Nov 2026 20:41:29 +0400 Subject: feat(ai): patrol around script-selected objects Uses the TMA logical ID to route a warbot around the current position of a building or unit. The original Behavior.dll confirms target class selection and radius. Mission 13 now assigns building patrols at stock startup. --- crates/fparkan-runtime/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/fparkan-runtime/src/lib.rs') diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index a17dd6ab..04aa8858 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -2528,12 +2528,12 @@ fn load_mission_with_options( let Some(patrol) = &mut unit_patrol else { continue; }; - if let Some(handle) = + if let Some((handle, center)) = order.apply(patrol, &mission, &object_drafts, &new_runtime_world) { eprintln!( "script_init_patrol unit={} id={} target={:?}", - handle.slot, order.actor_id, order.center + handle.slot, order.actor_id, center ); } } -- cgit v1.2.3