Fixed multiple file glitch for settings.
This commit is contained in:
parent
d3aab3661a
commit
d05198cd56
|
@ -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.
|
||||
/// </summary>
|
||||
|
||||
|
||||
|
|
|
@ -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
|
|||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Revitalize.Settings
|
||||
{
|
||||
|
||||
class SettingsManager
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue