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-script/src/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'crates/fparkan-script') diff --git a/crates/fparkan-script/src/lib.rs b/crates/fparkan-script/src/lib.rs index 3b6e8856..311334ef 100644 --- a/crates/fparkan-script/src/lib.rs +++ b/crates/fparkan-script/src/lib.rs @@ -81,7 +81,7 @@ pub enum Handler15TargetPayload { }, /// `TARGET_BY_TYPE` (`0x0203`): one DWORD payload. ByType(u32), - /// `TARGET_NOT_DEFINED` (`0x0204`): one DWORD payload. + /// `TARGET_NOT_DEFINED` (`0x0204`): optional legacy operand, zero when absent. NotDefined(u32), /// `TARGET_BY_NAME` (`0x0205`): one DWORD payload. ByName(u32), @@ -1286,7 +1286,11 @@ impl VarSet { second: dword(10)?, }, 0x0203 => Handler15TargetPayload::ByType(dword(9)?), - 0x0204 => Handler15TargetPayload::NotDefined(dword(9)?), + 0x0204 => Handler15TargetPayload::NotDefined(if instruction.references.len() == 9 { + 0 + } else { + dword(9)? + }), 0x0205 => Handler15TargetPayload::ByName(dword(9)?), mode => return Err(Handler15ResolveError::UnsupportedTargetMode(mode)), }; -- cgit v1.2.3