From c930b4e3a4a693ebcee2e46005c32d42567449d7 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 14 Nov 2026 21:30:46 +0400 Subject: feat(ai): queue clan script problems by native identity Pass Handler(2) operands through the existing scheduler and require matching script sections. The stock Two Fortresses clan queues research, transport, and robot problems before its combat-strength query. Pending dispatch is counted by clan and problem kind. --- crates/fparkan-runtime/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crates/fparkan-runtime/src/lib.rs') diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index 7b1eefa1..6fb2b320 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -2902,6 +2902,8 @@ pub struct SimulationReport { pub clan_ai_event_stops: Vec<(MissionEventStop, u64)>, /// Calls to stubbed research policy or status, grouped by clan and handler. pub clan_research_status_stubs: Vec<(usize, u8, u64)>, + /// Counts of pending script problems by clan and problem kind. + pub clan_problem_dispatch_stubs: std::collections::BTreeMap<(usize, u32), u64>, /// Total requests for mission information messages. pub mission_messages: u64, /// Clock of the first autonomous shot, in milliseconds. @@ -2937,6 +2939,7 @@ pub fn simulate_mission_report( mission_event_stops: Vec::new(), clan_ai_event_stops: Vec::new(), clan_research_status_stubs: Vec::new(), + clan_problem_dispatch_stubs: Default::default(), mission_messages: 0, autodemo_first_shot_ms: None, autodemo_first_destroyed_ms: None, @@ -2991,6 +2994,12 @@ pub fn simulate_mission_report( report .clan_research_status_stubs .extend(loaded.clan_ai_events.research_status_stubs()); + for problem in loaded.clan_ai_events.pending_problems() { + *report + .clan_problem_dispatch_stubs + .entry(problem) + .or_default() += 1; + } } Ok(report) } -- cgit v1.2.3