From 9e5a8867d1a12a66772e6e97c3a0213f9636d56c Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 25 Nov 2026 23:08:00 +0400 Subject: fix(research): advance laboratory Control energy budgets Paid laboratory work read a work-device coefficient that never received a Control budget update. Run the recovered resource clock and budget for laboratories as well as factories, so energy work follows the actual device allocation. Generalize the state and report counters to control_resource_*. A licensed outage regression drains the lab reserve and removes external power: energy work stays fixed while task time advances, then resumes when the original generation is restored. Stock research for both AI clans, player free research and paid factory production still pass. The original laboratory task reaches its class-3 Control owner, whose native budget runs on the same quarter-second resource path as the factory. Verified this in the running stock mission through Behavior 0x2f76e and Control 0x2d340. Workspace fmt/check/tests and release build pass. All 29 stock missions run 900 seconds without script or resource-budget stops. A stock mission-28 window completes paid technologies and starts subsequent projects. Control initial phase, RNG seed, other owners and global ordering remain approximate. --- apps/fparkan-game/src/script_coverage.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps') diff --git a/apps/fparkan-game/src/script_coverage.rs b/apps/fparkan-game/src/script_coverage.rs index 8fa25658..a01f16fa 100644 --- a/apps/fparkan-game/src/script_coverage.rs +++ b/apps/fparkan-game/src/script_coverage.rs @@ -144,11 +144,11 @@ pub(super) fn log_clan_ai_stops(report: &SimulationReport) { for &(clan, plant, count) in &report.factory_clock_ticks { eprintln!("sim_coverage script_factory_clock_approx={count} clan={clan} plant={plant}"); } - for &(unit, count) in &report.factory_control_ticks { - eprintln!("sim_coverage factory_control_clock_approx={count} unit={unit}"); + for &(unit, count) in &report.control_resource_ticks { + eprintln!("sim_coverage control_resource_clock_approx={count} unit={unit}"); } - for (unit, count, reason) in &report.factory_control_stops { - eprintln!("sim_coverage factory_control_budget_stub={count} unit={unit} reason={reason}"); + for (unit, count, reason) in &report.control_resource_stops { + eprintln!("sim_coverage control_resource_budget_stub={count} unit={unit} reason={reason}"); } for &(clan, plant, count) in &report.script_factory_rejections { eprintln!("sim_coverage script_factory_rejections={count} clan={clan} plant={plant}"); -- cgit v1.2.3