From 590c8f39b935f34fc6a4f9c033520c2c0359253d Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Tue, 1 Dec 2026 09:27:02 +0400 Subject: 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. --- crates/fparkan-runtime/src/unit_patrol.rs | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'crates/fparkan-runtime/src/unit_patrol.rs') 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() -- cgit v1.2.3