aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/clan_ai_events.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-26 18:16:52 +0300
committerValentin Popov <valentin@popov.link>2026-11-26 18:16:52 +0300
commite8ee72dd0ad717ed6060fbd6963209d0edec47f4 (patch)
tree88ad94924fe78098181cacba7c8dde1865379dea /crates/fparkan-runtime/src/clan_ai_events.rs
parentc4baa5aea1abac26779ec5075232dba724ab6630 (diff)
downloadfparkan-e8ee72dd0ad717ed6060fbd6963209d0edec47f4.tar.xz
fparkan-e8ee72dd0ad717ed6060fbd6963209d0edec47f4.zip
fix(ai): exclude light designs from assault research query
Use the registered root chassis size and candidate research status to complete the negative Handler(65) branch. Keep the coverage stub when a researched candidate still requires weapon rating and AI priority. The initial native catalog matches the Rust exclusions. The stock Two Fortresses window and 900-second simulation keep the capture branch, and all 29 missions still reach 900 seconds.
Diffstat (limited to 'crates/fparkan-runtime/src/clan_ai_events.rs')
-rw-r--r--crates/fparkan-runtime/src/clan_ai_events.rs19
1 files changed, 13 insertions, 6 deletions
diff --git a/crates/fparkan-runtime/src/clan_ai_events.rs b/crates/fparkan-runtime/src/clan_ai_events.rs
index e544a9d9..7b663482 100644
--- a/crates/fparkan-runtime/src/clan_ai_events.rs
+++ b/crates/fparkan-runtime/src/clan_ai_events.rs
@@ -1291,12 +1291,19 @@ impl LoadedMissionState {
ScriptDispatchSelector::Handler(handler @ 65)
if instruction.references.is_empty() =>
{
- // shortcut: large-warbot eligibility needs the native candidate power property.
- self.clan_ai_events.log_research_stub(
- clan,
- handler,
- &bundle.script_path,
- );
+ if self
+ .clan_ai_events
+ .research_catalogs
+ .get(&clan)
+ .is_some_and(crate::clan_research::ClanResearch::assault_needs_weapon_metadata)
+ {
+ // shortcut: the rating and priority change for eligible chassis are unmodeled.
+ self.clan_ai_events.log_research_stub(
+ clan,
+ handler,
+ &bundle.script_path,
+ );
+ }
Ok(Some(VarSetDefault::Dword(0)))
}
selector => Err(format!("{selector:?}")),