aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/clan_ai_events.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-01 08:27:02 +0300
committerValentin Popov <valentin@popov.link>2026-12-01 08:27:02 +0300
commit590c8f39b935f34fc6a4f9c033520c2c0359253d (patch)
treea21ce927fa1593f8931c90bf38c33cc9bf60cccf /crates/fparkan-runtime/src/clan_ai_events.rs
parent8dcaf3d7e5be5ddb8bae3cd9ced3032875c861ae (diff)
downloadfparkan-590c8f39b935f34fc6a4f9c033520c2c0359253d.tar.xz
fparkan-590c8f39b935f34fc6a4f9c033520c2c0359253d.zip
fix(ai): prepend base defence attacks to unit orders
The native task dispatcher inserts mode 2 at index zero without replacing the old list. Keep the interrupted order and queued tail, then run the base-defence wait after assigning the group in the stock mission.
Diffstat (limited to 'crates/fparkan-runtime/src/clan_ai_events.rs')
-rw-r--r--crates/fparkan-runtime/src/clan_ai_events.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/crates/fparkan-runtime/src/clan_ai_events.rs b/crates/fparkan-runtime/src/clan_ai_events.rs
index 9f636280..f5dad22f 100644
--- a/crates/fparkan-runtime/src/clan_ai_events.rs
+++ b/crates/fparkan-runtime/src/clan_ai_events.rs
@@ -969,14 +969,7 @@ impl LoadedMissionState {
}
ScriptDispatchSelector::Handler(8) if problem.is_some() => {
match single_dword(&instruction.references, values) {
- Some(1)
- if problem
- .as_ref()
- .is_some_and(|record| matches!(record.key.word_0, OPTIMAL_TRANSPORT | MINE_NEEDED | MAKE_RESEARCH | 6 | BUILDING_PROTECT | PLACE_PROTECT))
- || !conditions.is_empty() =>
- {
- solving = true
- }
+ Some(1) => solving = true,
Some(2) => solved = true,
_ => {
return Err(