2019-09-10 06:44:25 +08:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.IO;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
namespace Revitalize.Framework.Configs
|
|
|
|
{
|
|
|
|
public class GlobalMachineConfig
|
|
|
|
{
|
|
|
|
public bool doMachinesConsumeEnergy;
|
|
|
|
|
2019-09-17 06:48:26 +08:00
|
|
|
public double solarPanelNonSunnyDayEnergyMultiplier;
|
|
|
|
public double solarPanelNightEnergyGenerationMultiplier;
|
2019-09-19 06:05:51 +08:00
|
|
|
public bool showMachineNotificationBubble_InventoryFull;
|
|
|
|
public float machineNotificationBubbleAlpha;
|
2019-09-17 06:48:26 +08:00
|
|
|
|
2019-09-20 10:07:15 +08:00
|
|
|
public int grinderEnergyConsumption;
|
|
|
|
public int grinderTimeToGrind;
|
|
|
|
|
2019-09-22 09:48:21 +08:00
|
|
|
public int miningDrillEnergyConsumption;
|
|
|
|
public int miningDrillTimeToMine;
|
|
|
|
|
2019-09-26 07:12:42 +08:00
|
|
|
public int steamBoilerV1_requiredWaterPerOperation;
|
|
|
|
public int steamBoilerV1_producedSteamPerOperation;
|
|
|
|
|
2019-09-10 06:44:25 +08:00
|
|
|
public GlobalMachineConfig()
|
|
|
|
{
|
|
|
|
this.doMachinesConsumeEnergy = true;
|
2019-09-17 06:48:26 +08:00
|
|
|
this.solarPanelNonSunnyDayEnergyMultiplier = 0.0d;
|
|
|
|
this.solarPanelNightEnergyGenerationMultiplier = .125d;
|
2019-09-19 06:05:51 +08:00
|
|
|
this.showMachineNotificationBubble_InventoryFull = true;
|
|
|
|
this.machineNotificationBubbleAlpha = 0.75f;
|
2019-09-20 10:07:15 +08:00
|
|
|
this.grinderEnergyConsumption = 20;
|
|
|
|
this.grinderTimeToGrind = 30;
|
2019-09-22 09:48:21 +08:00
|
|
|
this.miningDrillEnergyConsumption = 50;
|
|
|
|
this.miningDrillTimeToMine = 60;
|
2019-09-26 07:12:42 +08:00
|
|
|
this.steamBoilerV1_requiredWaterPerOperation = 200;
|
|
|
|
this.steamBoilerV1_producedSteamPerOperation = 100;
|
2019-09-10 06:44:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public static GlobalMachineConfig InitializeConfig()
|
|
|
|
{
|
|
|
|
if (File.Exists(Path.Combine(ModCore.ModHelper.DirectoryPath, "Configs", "MachinesConfig.json")))
|
|
|
|
return ModCore.ModHelper.Data.ReadJsonFile<GlobalMachineConfig>(Path.Combine("Configs", "MachinesConfig.json"));
|
|
|
|
else
|
|
|
|
{
|
|
|
|
GlobalMachineConfig Config = new GlobalMachineConfig();
|
|
|
|
ModCore.ModHelper.Data.WriteJsonFile<GlobalMachineConfig>(Path.Combine("Configs", "MachinesConfig.json"), Config);
|
|
|
|
return Config;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|