From 593e38ba45fc7d28e28bdcc0fa8020a6c62deac0 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 25 Nov 2026 17:24:57 +0400 Subject: feat(ai): load clan research candidates during Init Handle the no-result Handler(43) by loading direct AI DAT candidates and running the recovered selector against the clan's TRF. Keep the catalog and its context alive per clan. Share catalog enumeration with transport selection. Match the stock NTFS name order, including underscore placement. A fresh Single.02 run of the original supplied 77 ordered entries, status bytes and selected index 60 (swelbld1.dat); the licensed regression matches that state. Both captured and installed ai.dll match the documented GOG SHA-256. Keep paid laboratory work, extended candidate metadata and Handler(69) explicitly stubbed. The report exposes loaded catalogs separately from those remaining gaps. A loading failure retains an indexed Init stub. Validate workspace fmt/check/tests, licensed live-catalog comparison, all 29 stock missions at 900 seconds without stops or Handler(43) load failures, and mission 29 in a Vulkan-validation window. --- crates/fparkan-runtime/src/clan_ai_events.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/fparkan-runtime/src/clan_ai_events.rs') diff --git a/crates/fparkan-runtime/src/clan_ai_events.rs b/crates/fparkan-runtime/src/clan_ai_events.rs index 911392f6..57de496d 100644 --- a/crates/fparkan-runtime/src/clan_ai_events.rs +++ b/crates/fparkan-runtime/src/clan_ai_events.rs @@ -229,6 +229,7 @@ pub(super) struct ClanAiEvents { next_ms: BTreeMap, stops: BTreeMap<(usize, usize, usize), (MissionEventStop, u64)>, research_stubs: BTreeMap<(usize, u8), u64>, + pub(super) research_catalogs: BTreeMap, problems: BTreeMap, started: BTreeMap<(usize, u32), u64>, factory_orders: BTreeMap<(u16, u32), u64>, @@ -1048,7 +1049,7 @@ impl LoadedMissionState { id, ) .any(|handle| Some(handle) == assignment); - // shortcut: an unloaded candidate catalog rejects the order; wire lab dispatch with Handler(43). + // shortcut: reject the order until the native laboratory research task is wired. self.clan_ai_events .log_research_stub(clan, 41, &bundle.script_path); Ok(Some(VarSetDefault::Dword(if exists { -- cgit v1.2.3