public static void LoadSettings()
 {
     if (File.Exists(Path.Combine(ETGMod.ResourcesDirectory, ExpandTheGungeon.ModSettingsFileName)))
     {
         string            CachedJSONText = File.ReadAllText(Path.Combine(ETGMod.ResourcesDirectory, ExpandTheGungeon.ModSettingsFileName));
         ExpandCachedStats cachedStats    = ScriptableObject.CreateInstance <ExpandCachedStats>();
         JsonUtility.FromJsonOverwrite(CachedJSONText, cachedStats);
         OverwriteUserSettings(cachedStats);
     }
     else
     {
         SaveSettings();
         return;
     }
 }
        public static void SaveSettings()
        {
            string CachedJSONText = string.Empty;

            ExpandCachedStats cachedStats = ScriptableObject.CreateInstance <ExpandCachedStats>();

            CachedJSONText = JsonUtility.ToJson(cachedStats);

            if (File.Exists(Path.Combine(ETGMod.ResourcesDirectory, ExpandTheGungeon.ModSettingsFileName)))
            {
                File.Delete(Path.Combine(ETGMod.ResourcesDirectory, ExpandTheGungeon.ModSettingsFileName));
            }

            ExpandAssets.SaveStringToFile(CachedJSONText, ETGMod.ResourcesDirectory, ExpandTheGungeon.ModSettingsFileName);
            return;
        }
 public static void OverwriteUserSettings(ExpandCachedStats stats)
 {
     EnableLogo            = stats.EnableLogo;
     EnableTestDungeonFlow = stats.EnableTestDungeonFlow;
     TestFlow                      = stats.TestFlow;
     TestFloor                     = stats.TestFloor;
     debugMode                     = stats.debugMode;
     youtubeSafeMode               = stats.youtubeSafeMode;
     IsHardModeBuild               = stats.IsHardModeBuild;
     EnableLanguageFix             = stats.EnableLanguageFix;
     EnableJungleRain              = stats.EnableJungleRain;
     EnableBloodiedScarfFix        = stats.EnableBloodiedScarfFix;
     GameLanguage                  = stats.GameLanguage;
     EnableExpandedGlitchFloors    = stats.EnableExpandedGlitchFloors;
     EnableGlitchFloorScreenShader = stats.EnableGlitchFloorScreenShader;
     EnableEXItems                 = stats.EnableEXItems;
     JungleRainIntensity           = stats.JungleRainIntensity;
 }