From 42b071c6ca267e76af8bfe5fd0af7b7bf19dcc6e Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 14 Nov 2026 21:21:10 +0400 Subject: fix(mining): feed placed mines from nearby deposits Bind stock mines to TMA reserves within the Behavior collection radius and report the live clan reserve to Problems0. Verified extraction from stock Single.01 and preserved the Field Camp mine order. Single.01 reaches Handler(56) in the 120-second report and renders with clean Vulkan validation. --- crates/fparkan-runtime/src/clan_ai_events.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (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 38ef3618..b6cda1e8 100644 --- a/crates/fparkan-runtime/src/clan_ai_events.rs +++ b/crates/fparkan-runtime/src/clan_ai_events.rs @@ -55,6 +55,15 @@ impl LoadedMissionState { (available - demand).to_bits(), ))) } + ScriptDispatchSelector::Handler(17) + if instruction.dword_pair(values) + == Some((crate::mining::MINE_CLASS, 0x0afc_0900)) => + { + let owner = OwnerId(clan as u16); + let remaining = + crate::mining::remaining_for_clan(&self.mine_sites, world, owner); + Ok(Some(VarSetDefault::FloatBits(remaining.to_bits()))) + } ScriptDispatchSelector::Handler(49) if instruction.references.is_empty() => { let slots = self .ai_startup_states -- cgit v1.2.3