From c38fb66d2b2dfed3a7eb748914a3e2d9f9871768 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 14 Nov 2026 20:50:32 +0400 Subject: feat(ai): queue scenario move orders for mobile units Runs the stock order sequence in mission 16. Both mobile headquarters receive five destinations in script order. Movement uses existing terrain routing until the native Go task is wired. --- crates/fparkan-runtime/src/clan_script_init.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'crates/fparkan-runtime/src/clan_script_init.rs') diff --git a/crates/fparkan-runtime/src/clan_script_init.rs b/crates/fparkan-runtime/src/clan_script_init.rs index 891cc5a3..ee205baa 100644 --- a/crates/fparkan-runtime/src/clan_script_init.rs +++ b/crates/fparkan-runtime/src/clan_script_init.rs @@ -5,6 +5,11 @@ use fparkan_script::{ pub(super) enum InitOrder { Patrol(ScriptPatrol), + Move { + id: u32, + destination: [u32; 2], + append: bool, + }, Shutdown(u32), Reserve { clan: usize, @@ -41,6 +46,15 @@ pub(super) fn unit_order( let order = declarations .resolve_handler15_with_values(instruction, values) .ok()?; + if let (2, insertion @ (1 | 3), Handler15TargetPayload::ByPlace { first, second }) = + (order.word_1, order.word_2, order.target) + { + return Some(InitOrder::Move { + id: order.word_0, + destination: [first, second], + append: insertion == 1, + }); + } if matches!( (order.word_1, order.word_2, order.target), (0x13, 3, Handler15TargetPayload::None) -- cgit v1.2.3