From d43524a8e40bb923d9275e17d3dc586701f08bbf Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 14 Nov 2026 23:44:04 +0400 Subject: feat(ai): build the clan transport from the AI catalog Let a scripted transport order survive a busy factory and use the unique eligible design from the clan technology table. The AI reserves its transport independently of the player scheme list. Two Fortresses released sml_cargo.dat from the stock start in the FParkan window and the licensed regression covers both factories. The x86 DLL chooser confirmed class, readiness, and fastest selection. Transport routes and live timing parity remain open. --- crates/fparkan-runtime/src/lib.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (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 6f2f6439..d93a5e5a 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -50,6 +50,7 @@ mod clan_combat_strength; mod clan_problem_conditions; mod clan_script_init; mod clan_targeting; +mod clan_transport_schemes; mod mesh_collision; mod mining; mod mission_events; @@ -1879,7 +1880,7 @@ fn load_mission_with_options( } else { Arc::from(&[][..]) }; - let build_schemes = if let Some(scheme) = build_scheme { + let mut build_schemes = if let Some(scheme) = build_scheme { vec![scheme.clone()] } else if options.start_autodemo && request.mode == MissionMode::SingleMission { production::mission_prebuilds(&config)? @@ -1933,6 +1934,18 @@ fn load_mission_with_options( } })?; let mut loaded_scripts = load_mission_scripts(&vfs, &mission, options.asset_scope)?; + let player_scheme_count = build_schemes.len(); + let transport_schemes = if options.start_autodemo && request.mode == MissionMode::SingleMission + { + clan_transport_schemes::available(vfs.as_ref(), &mission, &loaded_scripts.bundles) + } else { + Vec::new() + }; + for (_, path) in &transport_schemes { + if !build_schemes.contains(path) { + build_schemes.push(path.clone()); + } + } let research_trf_tables = if options.asset_scope == MissionAssetScope::Full && startup_input.is_some_and(|input| input.research_creation_gate) { @@ -2649,6 +2662,8 @@ fn load_mission_with_options( Some(production::Production::new( reserve_start, build_schemes, + player_scheme_count, + transport_schemes, reserve_controls, &object_drafts[..mine_reserve_start], )?), -- cgit v1.2.3