aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/clan_script_init.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/fparkan-runtime/src/clan_script_init.rs')
-rw-r--r--crates/fparkan-runtime/src/clan_script_init.rs14
1 files changed, 14 insertions, 0 deletions
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)