mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
fix(production): correct blueprint power and planner edge cases
Read the Advanced Mining Machine speed stored with station settings in prebuild and blueprint captures, and count charging power nodes such as Satellite Substations at their idle draw. Skip recipes that consume their own product when choosing an item's default recipe, so Refined Oil uses Plasma Refining instead of Reforming Refine. Run each planner recipe in one proliferation mode and report conflicting explicit modes, keep material flows for recipe types the catalog does not know, and attribute receiver warnings to their recipe. Compare simplex ratio ties relatively and drive out near-zero artificials without amplifying residuals. Bound the steady-state reduction so lossless cycles cannot stall blueprint descriptions, and choose power units after rounding. Remove redundant code: share the numeric and flow helpers, and drop the unused IsExcessIntermediate threshold, legacy constructor and Capture overloads, the multi-field updater, and the unused proliferator source table.
This commit is contained in:
1 parent
6345562c66
commit
f0773ffb9b
24 files changed
+463
-404
No files matched your search
@@ -77,8 +77,6 @@ public sealed class ProductionItemFlow
|
||||
public double? SteadyStateExternalSupply { get; }
|
||||
public bool IsFinalProduct { get; }
|
||||
public bool IsResearchProduct { get; }
|
||||
public bool IsExcessIntermediate { get; }
|
||||
public double SingleBuildingSurplusThreshold { get; }
|
||||
public double IntermediateShortage { get; }
|
||||
public double? OverbuildSurplus { get; }
|
||||
public double? CoproductSurplus { get; }
|
||||
@@ -87,20 +85,9 @@ public sealed class ProductionItemFlow
|
||||
|
||||
public ProductionItemFlow(int itemId, double grossProduction, double grossConsumption, double externalImports,
|
||||
double knownExternalSupply, double delivered, double surplus, double requiredExternalSupply,
|
||||
bool isFinalProduct, bool isExcessIntermediate, double singleBuildingSurplusThreshold,
|
||||
IEnumerable<int> producerGroups, IEnumerable<int> consumerGroups)
|
||||
: this(itemId, grossProduction, grossConsumption, externalImports, knownExternalSupply, delivered, surplus,
|
||||
requiredExternalSupply, isFinalProduct, isExcessIntermediate, singleBuildingSurplusThreshold,
|
||||
producerGroups, consumerGroups, 0, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public ProductionItemFlow(int itemId, double grossProduction, double grossConsumption, double externalImports,
|
||||
double knownExternalSupply, double delivered, double surplus, double requiredExternalSupply,
|
||||
bool isFinalProduct, bool isExcessIntermediate, double singleBuildingSurplusThreshold,
|
||||
IEnumerable<int> producerGroups, IEnumerable<int> consumerGroups, double intermediateShortage,
|
||||
double? overbuildSurplus, double? coproductSurplus, double? steadyStateExternalSupply = null,
|
||||
bool isResearchProduct = false)
|
||||
bool isFinalProduct, IEnumerable<int> producerGroups, IEnumerable<int> consumerGroups,
|
||||
double intermediateShortage = 0, double? overbuildSurplus = null, double? coproductSurplus = null,
|
||||
double? steadyStateExternalSupply = null, bool isResearchProduct = false)
|
||||
{
|
||||
ItemId = itemId;
|
||||
GrossProduction = grossProduction;
|
||||
@@ -113,8 +100,6 @@ public sealed class ProductionItemFlow
|
||||
SteadyStateExternalSupply = steadyStateExternalSupply;
|
||||
IsFinalProduct = isFinalProduct;
|
||||
IsResearchProduct = isResearchProduct;
|
||||
IsExcessIntermediate = isExcessIntermediate;
|
||||
SingleBuildingSurplusThreshold = singleBuildingSurplusThreshold;
|
||||
IntermediateShortage = intermediateShortage;
|
||||
OverbuildSurplus = overbuildSurplus;
|
||||
CoproductSurplus = coproductSurplus;
|
||||
@@ -181,17 +166,10 @@ public sealed class ProductionReport
|
||||
public double LaunchesPerMinute => Groups.Sum(group => group.LaunchesPerMinute);
|
||||
public double ResearchHashesPerMinute => Groups.Sum(group => group.ResearchHashesPerMinute);
|
||||
|
||||
public ProductionReport(ProductionStatus status, bool materialComplete, bool powerComplete,
|
||||
IEnumerable<ProductionItemFlow> itemFlows, IEnumerable<ProductionGroupFlow> groups,
|
||||
IEnumerable<ProductionDiagnostic> diagnostics, ProductionPower power)
|
||||
: this(status, materialComplete, powerComplete, itemFlows, groups, diagnostics, power, null)
|
||||
{
|
||||
}
|
||||
|
||||
public ProductionReport(ProductionStatus status, bool materialComplete, bool powerComplete,
|
||||
IEnumerable<ProductionItemFlow> itemFlows, IEnumerable<ProductionGroupFlow> groups,
|
||||
IEnumerable<ProductionDiagnostic> diagnostics, ProductionPower power,
|
||||
ProductionPowerBreakdown powerBreakdown)
|
||||
ProductionPowerBreakdown powerBreakdown = null)
|
||||
{
|
||||
Status = status;
|
||||
MaterialComplete = materialComplete;
|
||||
|
||||
Reference in new issue
Block a user