diff --git a/Revitalize/Revitalize/Revitalize/Class1.cs b/Revitalize/Revitalize/Revitalize/Class1.cs index 0f8905be..e2018e07 100644 --- a/Revitalize/Revitalize/Revitalize/Class1.cs +++ b/Revitalize/Revitalize/Revitalize/Class1.cs @@ -37,7 +37,7 @@ namespace Revitalize /// Get Time lapse code working so that machines propperly work though the night since I technically remove them. /// Art. Lots of Art. /// Clean up the freaking code. Geeze it's messy. - /// + /// Make a cleaner serializer and parser function to be used with the settings class. /// diff --git a/Revitalize/Revitalize/Revitalize/Settings/MachineSettings.cs b/Revitalize/Revitalize/Revitalize/Settings/MachineSettings.cs index 90f66828..cf4c6518 100644 --- a/Revitalize/Revitalize/Revitalize/Settings/MachineSettings.cs +++ b/Revitalize/Revitalize/Revitalize/Settings/MachineSettings.cs @@ -12,7 +12,7 @@ namespace Revitalize.Settings { class MachineSettings : SettingsInterface { - public static bool doMachinesConsumePower; + public bool doMachinesConsumePower; public MachineSettings() { @@ -47,6 +47,7 @@ namespace Revitalize.Settings /// public void SaveSettings() { + if (File.Exists(Path.Combine(Serialize.SettingsPath, "MachineSettings" + ".json"))) File.Delete(Path.Combine(Serialize.SettingsPath, "MachineSettings" + ".json")); Serialize.WriteToJsonFile(Path.Combine(Serialize.SettingsPath, "MachineSettings" + ".json"), (MachineSettings)SettingsManager.machineSettings); } } diff --git a/Revitalize/Revitalize/Revitalize/Settings/SettingsManager.cs b/Revitalize/Revitalize/Revitalize/Settings/SettingsManager.cs index 999da868..38ba80ec 100644 --- a/Revitalize/Revitalize/Revitalize/Settings/SettingsManager.cs +++ b/Revitalize/Revitalize/Revitalize/Settings/SettingsManager.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; namespace Revitalize.Settings { + class SettingsManager {