Пример #1
0
        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();
            }
        }
Пример #2
0
 public static void PrefsDataPostLoad(PrefsData prefsData)
 {
     if (prefsData.pauseOnUrgentLetter.HasValue)
     {
         if (prefsData.pauseOnUrgentLetter.Value)
         {
             prefsData.automaticPauseMode = AutomaticPauseMode.MajorThreat;
         }
         else
         {
             prefsData.automaticPauseMode = AutomaticPauseMode.Never;
         }
     }
 }
Пример #3
0
        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();
        }
Пример #4
0
        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;
            }
        }