public static void Init() { bool flag = !new FileInfo(GenFilePaths.PrefsFilePath).Exists; Prefs.data = new PrefsData(); Prefs.data = DirectXmlLoader.ItemFromXmlFile <PrefsData>(GenFilePaths.PrefsFilePath, true); if (flag) { Prefs.data.langFolderName = LanguageDatabase.SystemLanguageFolderName(); } }
public static void PrefsDataPostLoad(PrefsData prefsData) { if (prefsData.pauseOnUrgentLetter.HasValue) { if (prefsData.pauseOnUrgentLetter.Value) { prefsData.automaticPauseMode = AutomaticPauseMode.MajorThreat; } else { prefsData.automaticPauseMode = AutomaticPauseMode.Never; } } }
public static void Init() { bool num = !new FileInfo(GenFilePaths.PrefsFilePath).Exists; data = new PrefsData(); data = DirectXmlLoader.ItemFromXmlFile <PrefsData>(GenFilePaths.PrefsFilePath); BackCompatibility.PrefsDataPostLoad(data); if (num) { data.langFolderName = LanguageDatabase.SystemLanguageFolderName(); data.uiScale = ResolutionUtility.GetRecommendedUIScale(data.screenWidth, data.screenHeight); } if (DevModePermanentlyDisabledUtility.Disabled) { DevMode = false; } Apply(); }
public static void Init() { bool flag = !new FileInfo(GenFilePaths.PrefsFilePath).Exists; Prefs.data = new PrefsData(); Prefs.data = DirectXmlLoader.ItemFromXmlFile <PrefsData>(GenFilePaths.PrefsFilePath, true); if (flag) { Prefs.data.langFolderName = LanguageDatabase.SystemLanguageFolderName(); if (UnityData.isDebugBuild && !DevModePermanentlyDisabledUtility.Disabled) { Prefs.DevMode = true; } } if (DevModePermanentlyDisabledUtility.Disabled) { Prefs.DevMode = false; } }