aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/lib.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-14 20:36:18 +0300
committerValentin Popov <valentin@popov.link>2026-11-14 20:36:18 +0300
commit108dd67da99f9832d2e65e5e18f7d25cc2dfc9ed (patch)
treeed0e44c81aacd8fa91512e10ac0092353700bd5d /crates/fparkan-runtime/src/lib.rs
parentc930b4e3a4a693ebcee2e46005c32d42567449d7 (diff)
downloadfparkan-108dd67da99f9832d2e65e5e18f7d25cc2dfc9ed.tar.xz
fparkan-108dd67da99f9832d2e65e5e18f7d25cc2dfc9ed.zip
feat(ai): start the highest-priority clan script problem
Open the matching Start section after Problems0, expose its arguments, and support completion and unreserved placed-unit selection. Two Fortresses enters its laboratory job and reaches Handler(6). Timing, ties and continuation remain explicit approximations.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
-rw-r--r--crates/fparkan-runtime/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs
index 6fb2b320..3087d175 100644
--- a/crates/fparkan-runtime/src/lib.rs
+++ b/crates/fparkan-runtime/src/lib.rs
@@ -2904,6 +2904,8 @@ pub struct SimulationReport {
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>,
+ /// Starts under the approximate scheduler, grouped by clan and problem kind.
+ pub clan_problem_starts: Vec<(usize, u32, u64)>,
/// Total requests for mission information messages.
pub mission_messages: u64,
/// Clock of the first autonomous shot, in milliseconds.
@@ -2940,6 +2942,7 @@ pub fn simulate_mission_report(
clan_ai_event_stops: Vec::new(),
clan_research_status_stubs: Vec::new(),
clan_problem_dispatch_stubs: Default::default(),
+ clan_problem_starts: Vec::new(),
mission_messages: 0,
autodemo_first_shot_ms: None,
autodemo_first_destroyed_ms: None,
@@ -3000,6 +3003,9 @@ pub fn simulate_mission_report(
.entry(problem)
.or_default() += 1;
}
+ report
+ .clan_problem_starts
+ .extend(loaded.clan_ai_events.started_problems());
}
Ok(report)
}