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-25 22:01:05 +08:00
1 parent 97f032a5af
commit 51e90a8e1d
13 files changed
+418 -254

No files matched your search

+2 -20
View File
@@ -58,27 +58,9 @@ public sealed class LaunchProcessAdapter : IProductionProcessAdapter
return false;
}
var boostModeKey = building.Kind == ProductionBuildingKind.Ejector ? "Mode1" : "Mode0";
if (!operatingParameters.TryGetValue(boostModeKey, out var boostMode) ||
(boostMode != 0 && boostMode != 1) ||
boostMode == 1 && !operatingParameters.ContainsKey("BoostEnabled"))
{
diagnostic = new ProductionDiagnostic(ProductionDiagnosticCode.MissingOperatingParameter,
"Provide the launcher's native boost mode and whether sandbox boost is active.",
buildingItemId: building.ItemId);
if (!SandboxBoost.TryResolve(operatingParameters, SandboxBoost.ModeKey(building), building.ItemId,
out var boosted, out diagnostic))
return false;
}
var boosted = operatingParameters.TryGetValue("BoostEnabled", out var boostEnabled) &&
boostEnabled == 1;
if (operatingParameters.ContainsKey("BoostEnabled") &&
(boostEnabled != 0 && boostEnabled != 1 || boosted && boostMode != 1))
{
diagnostic = new ProductionDiagnostic(ProductionDiagnosticCode.InvalidRequest,
"The sandbox boost setting conflicts with the launcher's native mode.",
buildingItemId: building.ItemId);
return false;
}
var speedBonus = 0.0;
var powerMultiplier = 1.0;