mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
feat(uxassist): generate blueprint production descriptions
Add native blueprint description generation with proliferation controls, separate power categories, and steady-state material and research reporting. Distinguish necessary coproducts from overbuild and fractional headroom, with regression checks and updated architecture documentation. Validation: 464 ProductionCheck checks and Release builds of UXAssist, CheatEnabler, and UniverseGenTweaks.
This commit is contained in:
1 parent
8696a80a66
commit
307bb4740d
16 files changed
+2294
-51
No files matched your search
@@ -173,6 +173,8 @@ public static class BlueprintSelectionReader
|
||||
});
|
||||
var operation = new Dictionary<string, double>();
|
||||
AddSettings(parameters, operation);
|
||||
if (operation.ContainsKey("ResearchMode"))
|
||||
operation["ResearchMatrixSink"] = 1;
|
||||
if (building.Kind == ProductionBuildingKind.Logistics)
|
||||
CaptureStoredChargePower(building, parameters, blueprint.parameters, operation);
|
||||
ApplySupplied(context?.OperatingParametersByIndex, blueprint.index, operation);
|
||||
@@ -449,7 +451,9 @@ public static class BlueprintSelectionReader
|
||||
IReadOnlyDictionary<string, double> operation, ICollection<ProductionDiagnostic> diagnostics)
|
||||
{
|
||||
var kind = building.Kind;
|
||||
var requiredKey = parameters.type == BuildingType.Lab && parameters.mode0 == 2 ? "TechId" :
|
||||
var researchNeedsTechnology = parameters.type == BuildingType.Lab && parameters.mode0 == 2 &&
|
||||
(!operation.TryGetValue("ResearchMatrixSink", out var matrixSink) || matrixSink != 1);
|
||||
var requiredKey = researchNeedsTechnology ? "TechId" :
|
||||
kind == ProductionBuildingKind.Miner ? "ResourceItemId" :
|
||||
kind == ProductionBuildingKind.Collector ? "GasCount" :
|
||||
kind == ProductionBuildingKind.FuelGenerator ? "FuelItemId" :
|
||||
@@ -458,8 +462,7 @@ public static class BlueprintSelectionReader
|
||||
diagnostics.Add(new ProductionDiagnostic(ProductionDiagnosticCode.MissingOperatingParameter,
|
||||
$"The selected building needs the {requiredKey} operating parameter.",
|
||||
buildingItemId: building.ItemId));
|
||||
if (parameters.type == BuildingType.Lab && parameters.mode0 == 2 &&
|
||||
!operation.ContainsKey("ResearchSpeed"))
|
||||
if (researchNeedsTechnology && !operation.ContainsKey("ResearchSpeed"))
|
||||
diagnostics.Add(new ProductionDiagnostic(ProductionDiagnosticCode.MissingOperatingParameter,
|
||||
"The research lab needs the current research technology speed.",
|
||||
buildingItemId: building.ItemId));
|
||||
|
||||
Reference in new issue
Block a user