aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/unit_patrol.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-01 08:27:02 +0300
committerValentin Popov <valentin@popov.link>2026-12-01 08:27:02 +0300
commit590c8f39b935f34fc6a4f9c033520c2c0359253d (patch)
treea21ce927fa1593f8931c90bf38c33cc9bf60cccf /crates/fparkan-runtime/src/unit_patrol.rs
parent8dcaf3d7e5be5ddb8bae3cd9ced3032875c861ae (diff)
downloadfparkan-590c8f39b935f34fc6a4f9c033520c2c0359253d.tar.xz
fparkan-590c8f39b935f34fc6a4f9c033520c2c0359253d.zip
fix(ai): prepend base defence attacks to unit orders
The native task dispatcher inserts mode 2 at index zero without replacing the old list. Keep the interrupted order and queued tail, then run the base-defence wait after assigning the group in the stock mission.
Diffstat (limited to 'crates/fparkan-runtime/src/unit_patrol.rs')
-rw-r--r--crates/fparkan-runtime/src/unit_patrol.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/crates/fparkan-runtime/src/unit_patrol.rs b/crates/fparkan-runtime/src/unit_patrol.rs
index cfe49901..b4b81c7f 100644
--- a/crates/fparkan-runtime/src/unit_patrol.rs
+++ b/crates/fparkan-runtime/src/unit_patrol.rs
@@ -310,17 +310,6 @@ impl UnitPatrol {
self.units.iter().any(|unit| unit.handle == handle)
}
- pub(super) fn has_object_order(&self, handle: ObjectHandle, target: ObjectHandle) -> bool {
- self.units
- .iter()
- .any(|unit| unit.handle == handle && unit.has_object_order(target))
- }
-
- pub(super) fn clear_object_order(&mut self, handle: ObjectHandle, target: ObjectHandle) {
- self.units
- .retain(|unit| unit.handle != handle || !unit.has_object_order(target));
- }
-
pub(super) fn has_point_order(&self, handle: ObjectHandle, point: [f32; 2]) -> bool {
self.units
.iter()