diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-14 22:31:36 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-14 22:31:36 +0300 |
| commit | 947be441148cea94b2a847268b885cc20d36b2aa (patch) | |
| tree | ce91ecadac2760341f8c87cbbf1b6bfd4d5d9a8b /crates/fparkan-runtime/src/lib.rs | |
| parent | 41ff7eec69baff620f97a636bd5a7709f7e27eb1 (diff) | |
| download | fparkan-947be441148cea94b2a847268b885cc20d36b2aa.tar.xz fparkan-947be441148cea94b2a847268b885cc20d36b2aa.zip | |
feat(ai): keep the scripted factory patrol active
Run the active factory protection event before Problems0. Its group retains assigned warbots and can recruit replacements. Release the patrol when the factory is lost.
The stock Two Fortresses run assigned a patrol around the enemy factory in both simulation and the Vulkan window. A direct x86 DLL call confirmed Handler(45) sums assigned ratings and skips free slots. Live comparison with the original remains open.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index aca04ebd..6f2f6439 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -2935,6 +2935,7 @@ pub struct SimulationReport { pub script_base_threat_queries: Vec<(usize, u32, u64)>, pub script_group_orders: Vec<(usize, u32, u64)>, pub script_problem_waits: Vec<(usize, u32, u64)>, + pub script_factory_patrol_continues: Vec<(usize, u32, u64)>, pub script_capturer_queries: Vec<(usize, u64)>, pub script_capture_approaches: Vec<(u32, u32, u64)>, /// First factory completion by clan, in milliseconds. @@ -2985,6 +2986,7 @@ pub fn simulate_mission_report( script_base_threat_queries: Vec::new(), script_group_orders: Vec::new(), script_problem_waits: Vec::new(), + script_factory_patrol_continues: Vec::new(), script_capturer_queries: Vec::new(), script_capture_approaches: Vec::new(), first_factory_completion_ms: Default::default(), @@ -3085,6 +3087,9 @@ pub fn simulate_mission_report( .script_problem_waits .extend(loaded.clan_ai_events.wait_starts()); report + .script_factory_patrol_continues + .extend(loaded.clan_ai_events.patrol_continues()); + report .script_capturer_queries .extend(loaded.clan_ai_events.capturer_queries()); report |
