From 859ee30fa51b2e5c970015b5192652f3ac022b04 Mon Sep 17 00:00:00 2001 From: innominata Date: Wed, 2 Feb 2022 21:05:59 +1300 Subject: [PATCH] Update Settings.cs --- .../GalacticScale2.0/Generators/GS2Dev/Settings.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/GalacticScale2/Scripts/GalacticScale2.0/Generators/GS2Dev/Settings.cs b/GalacticScale2/Scripts/GalacticScale2.0/Generators/GS2Dev/Settings.cs index 62e6c3e3..22eda6ad 100644 --- a/GalacticScale2/Scripts/GalacticScale2.0/Generators/GS2Dev/Settings.cs +++ b/GalacticScale2/Scripts/GalacticScale2.0/Generators/GS2Dev/Settings.cs @@ -38,20 +38,26 @@ public void Init() public void Import(GSGenPreferences importedPreferences) { + Warn("Importing Preferences"); for (var i = 0; i < importedPreferences.Count; i++) { var key = importedPreferences.Keys.ElementAt(i); + Warn($"Setting:{key} to {importedPreferences[key]}"); preferences.Set(key, importedPreferences[key]); - if (loaded && UI.ContainsKey(key)) UI[key].Set(importedPreferences[key]); + if (loaded && UI.ContainsKey(key)) { + Warn("UI Loaded, setting UI Element to match"); + UI[key].Set(importedPreferences[key]); + } } if (loaded) loaded = false; Config.DefaultStarCount = importedPreferences.GetInt("defaultStarCount"); - if (!importedPreferences.GetBool("ludicrousMode")) Config.MaxStarCount = 1024; + //if (!importedPreferences.GetBool("ludicrousMode")) Config.MaxStarCount = 1024; } public GSGenPreferences Export() { + Warn("Exporting Preferences"); return preferences; }