mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
refactor: remove single-owner helpers and redundant plumbing
Return feature-only helpers to their owners, remove inactive scaffolding and duplicate state, and reuse existing calculation and UI work without changing public contracts or gameplay. Record repository-wide coverage, justified retentions, independent reviews and validation, including baseline dashboard fixture failures. Assisted-by: Cindy (https://cindy.app)
This commit is contained in:
1 parent
64a23e9772
commit
e35fba88ae
60 files changed
+1094
-994
No files matched your search
@@ -88,7 +88,8 @@ public static class BlueprintDescriptionFormatter
|
||||
var input = new List<string>();
|
||||
var output = new SortedDictionary<int, double>();
|
||||
var research = new SortedDictionary<int, double>();
|
||||
foreach (var flow in report.ItemFlows.Values.OrderBy(flow => flow.ItemId))
|
||||
var orderedFlows = report.ItemFlows.Values.OrderBy(flow => flow.ItemId).ToArray();
|
||||
foreach (var flow in orderedFlows)
|
||||
{
|
||||
var shortage = Math.Min(flow.IntermediateShortage,
|
||||
flow.SteadyStateExternalSupply ?? flow.RequiredExternalSupply);
|
||||
@@ -98,14 +99,14 @@ public static class BlueprintDescriptionFormatter
|
||||
|
||||
if (report.MaterialComplete)
|
||||
{
|
||||
foreach (var flow in report.ItemFlows.Values.OrderBy(flow => flow.ItemId))
|
||||
foreach (var flow in orderedFlows)
|
||||
{
|
||||
if (flow.OverbuildSurplus.GetValueOrDefault() > Tolerance)
|
||||
excess.Add(FormatItem(flow.ItemId, flow.OverbuildSurplus.Value, itemTag));
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var flow in report.ItemFlows.Values.OrderBy(flow => flow.ItemId))
|
||||
foreach (var flow in orderedFlows)
|
||||
{
|
||||
var requiredSupply = flow.SteadyStateExternalSupply ?? flow.RequiredExternalSupply;
|
||||
if (requiredSupply > Tolerance && flow.IntermediateShortage <= Tolerance)
|
||||
|
||||
@@ -119,8 +119,7 @@ public static class ProductionCatalogReader
|
||||
}
|
||||
|
||||
return new ProductionCatalog(items, recipes, buildings,
|
||||
(double[])Cargo.accTableMilli.Clone(), (double[])Cargo.incTableMilli.Clone(),
|
||||
(double[])Cargo.powerTableRatio.Clone(), technologies, matrixIds);
|
||||
Cargo.accTableMilli, Cargo.incTableMilli, Cargo.powerTableRatio, technologies, matrixIds);
|
||||
}
|
||||
|
||||
private static void AddSpecialRecipes(IEnumerable<ItemProto> itemProtos,
|
||||
|
||||
Reference in new issue
Block a user