aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/mission_events.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-14 19:41:29 +0300
committerValentin Popov <valentin@popov.link>2026-11-14 19:41:29 +0300
commit2420e84d82cc1afdafc70882e51d4482dcdaad5b (patch)
tree05cf5155c5cf0ec06c2429e413671433b1e8f7ce /crates/fparkan-runtime/src/mission_events.rs
parent7b04b7760373ee8d86f5652b1bd2914a8ee2db79 (diff)
downloadfparkan-2420e84d82cc1afdafc70882e51d4482dcdaad5b.tar.xz
fparkan-2420e84d82cc1afdafc70882e51d4482dcdaad5b.zip
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.
Diffstat (limited to 'crates/fparkan-runtime/src/mission_events.rs')
-rw-r--r--crates/fparkan-runtime/src/mission_events.rs6
1 files changed, 3 insertions, 3 deletions
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,