Added in config options for how much water the steam boiler requires per 10 min and how much steam it produces per operation.

This commit is contained in:
JoshuaNavarro 2019-09-25 16:12:42 -07:00
parent 720ac67216
commit 09c32bf96f
2 changed files with 8 additions and 3 deletions

View File

@ -22,6 +22,9 @@ namespace Revitalize.Framework.Configs
public int miningDrillEnergyConsumption;
public int miningDrillTimeToMine;
public int steamBoilerV1_requiredWaterPerOperation;
public int steamBoilerV1_producedSteamPerOperation;
public GlobalMachineConfig()
{
this.doMachinesConsumeEnergy = true;
@ -33,6 +36,8 @@ namespace Revitalize.Framework.Configs
this.grinderTimeToGrind = 30;
this.miningDrillEnergyConsumption = 50;
this.miningDrillTimeToMine = 60;
this.steamBoilerV1_requiredWaterPerOperation = 200;
this.steamBoilerV1_producedSteamPerOperation = 100;
}
public static GlobalMachineConfig InitializeConfig()

View File

@ -237,10 +237,10 @@ namespace Revitalize.Framework.Objects.Machines.EnergyGeneration
public virtual void processFluidLogic()
{
if (this.GetFluidManager().doTheInputTanksHaveEnoughFluid(ModCore.ObjectManager.resources.getFluid("Water"), 200))
if (this.GetFluidManager().doTheInputTanksHaveEnoughFluid(ModCore.ObjectManager.resources.getFluid("Water"), ModCore.Configs.machinesConfig.steamBoilerV1_requiredWaterPerOperation))
{
this.GetFluidManager().consumeFluid(ModCore.ObjectManager.resources.getFluid("Water"), 200);
this.GetFluidManager().produceFluid(ModCore.ObjectManager.resources.getFluid("Steam"), 100);
this.GetFluidManager().consumeFluid(ModCore.ObjectManager.resources.getFluid("Water"), ModCore.Configs.machinesConfig.steamBoilerV1_requiredWaterPerOperation);
this.GetFluidManager().produceFluid(ModCore.ObjectManager.resources.getFluid("Steam"), ModCore.Configs.machinesConfig.steamBoilerV1_producedSteamPerOperation);
this.containerObject.MinutesUntilReady -= 10;
}
}