diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-14 22:55:21 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-14 22:55:21 +0300 |
| commit | 64bb8b476b525706d08d00be7c6f6cc397606c06 (patch) | |
| tree | 8a6bb33086190196517ff7e255d815480da4d9b7 /crates/fparkan-script/src/lib.rs | |
| parent | d43524a8e40bb923d9275e17d3dc586701f08bbf (diff) | |
| download | fparkan-64bb8b476b525706d08d00be7c6f6cc397606c06.tar.xz fparkan-64bb8b476b525706d08d00be7c6f6cc397606c06.zip | |
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.
Diffstat (limited to 'crates/fparkan-script/src/lib.rs')
| -rw-r--r-- | crates/fparkan-script/src/lib.rs | 8 |
1 files changed, 6 insertions, 2 deletions
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)), }; |
