From 09c32bf96fabf50c2b666d10d36f88fc45a1c505 Mon Sep 17 00:00:00 2001 From: JoshuaNavarro Date: Wed, 25 Sep 2019 16:12:42 -0700 Subject: [PATCH] Added in config options for how much water the steam boiler requires per 10 min and how much steam it produces per operation. --- .../Revitalize/Framework/Configs/GlobalMachineConfig.cs | 5 +++++ .../Objects/Machines/EnergyGeneration/SteamBoiler.cs | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/GeneralMods/Revitalize/Framework/Configs/GlobalMachineConfig.cs b/GeneralMods/Revitalize/Framework/Configs/GlobalMachineConfig.cs index b0b799bc..8e1bf4bc 100644 --- a/GeneralMods/Revitalize/Framework/Configs/GlobalMachineConfig.cs +++ b/GeneralMods/Revitalize/Framework/Configs/GlobalMachineConfig.cs @@ -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() diff --git a/GeneralMods/Revitalize/Framework/Objects/Machines/EnergyGeneration/SteamBoiler.cs b/GeneralMods/Revitalize/Framework/Objects/Machines/EnergyGeneration/SteamBoiler.cs index 3798a5d5..c9ce4bfa 100644 --- a/GeneralMods/Revitalize/Framework/Objects/Machines/EnergyGeneration/SteamBoiler.cs +++ b/GeneralMods/Revitalize/Framework/Objects/Machines/EnergyGeneration/SteamBoiler.cs @@ -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; } }