From 64bb8b476b525706d08d00be7c6f6cc397606c06 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 14 Nov 2026 23:55:21 +0400 Subject: feat(ai): carry ore from clan mines to storage Resolve the stock transport order against the newly produced unit. Move between owned endpoints and limit transfers by rate, source stock and destination space. The window logged the first departure and the stock simulation completed an unloading cycle. Native roster selection was called directly. Port approaches and rates remain approximations. --- crates/fparkan-runtime/src/unit_patrol.rs | 5 +++++ 1 file changed, 5 insertions(+) (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 bc2dc3a4..149f466b 100644 --- a/crates/fparkan-runtime/src/unit_patrol.rs +++ b/crates/fparkan-runtime/src/unit_patrol.rs @@ -269,6 +269,11 @@ impl UnitPatrol { .any(|unit| unit.handle == handle && unit.destinations.is_some()) } + pub(super) fn clear_move(&mut self, handle: ObjectHandle) { + self.units + .retain(|unit| unit.handle != handle || unit.destinations.is_none()); + } + pub(super) fn raid_factory(&self, handle: ObjectHandle) -> Option<(ObjectHandle, usize)> { self.units .iter() -- cgit v1.2.3