diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-14 23:04:40 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-14 23:04:40 +0300 |
| commit | bbd6088b7fb1162a976bcfa1ca6720c2c91e8a72 (patch) | |
| tree | a6aa1a70682a50af3830730c878887bd467d5b6d /crates/fparkan-runtime/src/lib.rs | |
| parent | 64bb8b476b525706d08d00be7c6f6cc397606c06 (diff) | |
| download | fparkan-bbd6088b7fb1162a976bcfa1ca6720c2c91e8a72.tar.xz fparkan-bbd6088b7fb1162a976bcfa1ca6720c2c91e8a72.zip | |
feat(ai): find and reserve sites for scripted construction
Handler 18 scans base rings, checks terrain and clearance, and writes the site back to the script. The stock Two Fortresses window found a tower site and reached the builder order. The native DLL returned the expected site with and without a reservation, and zero for missing areas. The builder task remains explicit in coverage.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index 9dba33cb..0261b1b0 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -51,6 +51,7 @@ mod clan_problem_conditions; mod clan_script_init; mod clan_targeting; mod clan_transport_schemes; +mod construction_site; mod mesh_collision; mod mining; mod mission_events; @@ -2953,6 +2954,7 @@ pub struct SimulationReport { pub script_problem_waits: Vec<(usize, u32, u64)>, pub script_factory_patrol_continues: Vec<(usize, u32, u64)>, pub script_ore_transport_orders: Vec<(usize, u32, u64)>, + pub script_building_site_queries: 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. @@ -3005,6 +3007,7 @@ pub fn simulate_mission_report( script_problem_waits: Vec::new(), script_factory_patrol_continues: Vec::new(), script_ore_transport_orders: Vec::new(), + script_building_site_queries: Vec::new(), script_capturer_queries: Vec::new(), script_capture_approaches: Vec::new(), first_factory_completion_ms: Default::default(), @@ -3111,6 +3114,9 @@ pub fn simulate_mission_report( .script_ore_transport_orders .extend(loaded.clan_ai_events.transport_orders()); report + .script_building_site_queries + .extend(loaded.clan_ai_events.building_site_queries()); + report .script_capturer_queries .extend(loaded.clan_ai_events.capturer_queries()); report |
