Esempio n. 1
0
 public IngotType CalculateNormalisationFactor(IngotType type)
 {
     if (type.ProductionNormalisationFactor > 0)
     {
         return(type);
     }
     type.ProductionNormalisationFactor = GetOutputPerSecondForDefaultBlueprint(type.ItemType);
     return(type);
 }
Esempio n. 2
0
 public IngotStockpile(IngotType ingot)
 {
     if (ingot.ProductionNormalisationFactor <= 0)
     {
         throw new Exception(string.Format("ProductionNormalisationFactor is not positive, for ingot type {0}", ingot.ItemType));
     }
     Ingot = ingot;
     UpdateAssemblerSpeed(1); // Default assembler speed to 'realistic'. Provided for tests; should be updated prior to use anyway.
 }
Esempio n. 3
0
            public IngotType Configure(IngotType type)
            {
                RequestedIngotConfiguration ingotConfig;

                if (!ingotConfigurations.TryGetValue(type.ItemType, out ingotConfig))
                {
                    return(type);
                }
                type.Enabled = true; // Enable it if it's not already enabled.
                type.StockpileTargetOverride = ingotConfig.StockpileTarget;
                type.StockpileLimit          = ingotConfig.StockpileLimit;
                return(type);
            }