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/mission_events.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/fparkan-runtime/src/mission_events.rs') diff --git a/crates/fparkan-runtime/src/mission_events.rs b/crates/fparkan-runtime/src/mission_events.rs index 1d4c7856..1c900819 100644 --- a/crates/fparkan-runtime/src/mission_events.rs +++ b/crates/fparkan-runtime/src/mission_events.rs @@ -765,10 +765,10 @@ impl LoadedMissionState { let Some(patrol) = &mut self.unit_patrol else { return Err("Handler(15) patrol runtime is unavailable".into()); }; - if let Some(handle) = + if let Some(order) = order.apply(patrol, &self.mission, &self.object_drafts, world) { - patrol_orders.push((handle, order.center)); + patrol_orders.push(order); } Ok(None) } @@ -895,7 +895,7 @@ fn tactical_area_contains( }) } -fn placed_logic_objects<'a>( +pub(super) fn placed_logic_objects<'a>( mission: &'a super::MissionDocument, world: &'a World, id: u32, -- cgit v1.2.3