fix(production): correct full-load capture and solver scaling

Stop capturing the transient miner output damper, apply the sandbox boost state to artificial stars as for launchers, and keep lens-free photon flows when no ray receiver is selected.

Scale the planner conservation check by each ledger row and normalize the simplex right-hand side so large rates no longer fail. Skip non-production objects before copying native settings, decode blueprints through the native paste path, and simplify analyzer mode resolution.

Update stale ProductionCheck expectations, add regression checks, and document the rules.
This commit is contained in:
soarqin committed 2026-10-11 03:13:07 +08:00
1 parent bcc82e1056
commit d4ba72abf4
13 files changed
+418 -254

No files matched your search

+3 -15
View File
@@ -66,22 +66,10 @@ public sealed class MiningProcessAdapter : IProductionProcessAdapter
machineSpeed = suppliedSpeed;
}
var speedDamper = 1.0;
if (operatingParameters.TryGetValue("SpeedDamper", out var suppliedDamper))
{
if (!FinitePositive(suppliedDamper))
{
diagnostic = new ProductionDiagnostic(ProductionDiagnosticCode.InvalidRequest,
"The miner speed damper must be positive.", buildingItemId: building.ItemId);
return false;
}
speedDamper = suppliedDamper;
}
// The native speed damper only throttles backed-up output, so full load keeps its unobstructed value of 1.
var perMinute = ProductionUnits.TicksPerMinute * ProductionUnits.FixedPointScale /
building.MiningPeriodTicks * miningSpeed * machineSpeed * speedDamper * resourceFactor;
var powerRatio = speedDamper * machineSpeed * machineSpeed;
building.MiningPeriodTicks * miningSpeed * machineSpeed * resourceFactor;
var powerRatio = machineSpeed * machineSpeed;
var workingWatts = building.WorkingPowerWatts * powerRatio +
building.IdlePowerWatts * (1 - powerRatio);
if (!FinitePositive(perMinute) || workingWatts < 0 ||