예제 #1
0
        public void Import(Persistence.Lookup settings)
        {
            mHolidaySettings.Clear();
            foreach (HolidaySettings setting in settings.GetList <HolidaySettings>("Holidays"))
            {
                mHolidaySettings[setting.Season] = setting;
            }

            mWeatherSettings.Clear();
            foreach (WeatherSettings setting in settings.GetList <WeatherSettings>("Weather"))
            {
                mWeatherSettings[setting.Season] = setting;
            }

            Tempest.ReapplySettings();
        }
예제 #2
0
        public void Import(Persistence.Lookup settings)
        {
            MasterController.Settings.SkillStamps.Clear();
            MasterController.Settings.SkillStamps.AddRange(settings.GetList <SkillStamp>(""));

            MasterController.Settings.UpdateStamp();
        }
예제 #3
0
        public void Import(Persistence.Lookup settings)
        {
            Relativity.Settings.ClearMotiveFactors();

            foreach (MotiveKeyValue key in settings.GetList <MotiveKeyValue>("Motives"))
            {
                Relativity.Settings.SetMotiveFactor(key.mKey, key.mValue);
            }
        }
예제 #4
0
        public void Import(Persistence.Lookup settings)
        {
            Relativity.Settings.Intervals.Clear();

            foreach (SpeedInterval interval in settings.GetList <SpeedInterval>("Intervals"))
            {
                Relativity.Settings.Add(interval);
            }
        }
예제 #5
0
        public void Import(Persistence.Lookup settings)
        {
            mKey = settings.GetChild <SettingsKey>("Key");

            mSettings.Clear();
            foreach (ITUNSettings setting in settings.GetList <ITUNSettings>("Settings"))
            {
                mSettings[setting.mName] = setting;
            }

            mTunables      = settings.GetList <TunableStore>("Tunables");
            mTunableLookup = null;

            mActionData.Clear();
            foreach (ActionDataSetting setting in settings.GetList <ActionDataSetting>("ActionData"))
            {
                mActionData[setting.mName] = setting;
            }

            Apply();
        }
예제 #6
0
        public void Import(Persistence.Lookup settings)
        {
            serviceSettings.Clear();
            foreach (ServiceSettingKey setting in settings.GetList <ServiceSettingKey>("Services"))
            {
                serviceSettings[setting.type] = setting;
            }

            Register.InitDefaultServiceTunings();
            ServiceCleanup.Task.Perform();
            ServicePoolCleanup.Task.Perform();
        }
예제 #7
0
파일: SkillStamp.cs 프로젝트: yakoder/NRaas
        public void Import(Persistence.Lookup settings)
        {
            mName = settings.GetString("Name");

            List <PersistItem> list = settings.GetList <PersistItem>("Skill");

            mSkills.Clear();

            foreach (PersistItem value in list)
            {
                mSkills.Add(value.mSkill, value.mLevel);
            }
        }
예제 #8
0
            public override void Import(Persistence.Lookup settings)
            {
                sSettings = settings.GetChild <PersistedSettings>("Settings");

                SeasonSettings generalSettings = Settings.GetSettings(new GeneralKey());

                // Backwards compatibility with Version 1
                foreach (PersistedSettings.Settings setting in settings.GetList <PersistedSettings.Settings>("Settings"))
                {
                    generalSettings.ApplyLegacySetting(setting);
                }

                Common.FunctionTask.Perform(ApplySettings);
            }
예제 #9
0
        public void Import(Persistence.Lookup settings)
        {
            mName = settings.GetString("Name");

            mStart = settings.GetInt("Start", 1);
            mEnd   = settings.GetInt("End", -1);

            mEnabled = settings.GetBool("Enabled", false);

            Import(ref mMorningTemp, settings, "MorningTemp");
            Import(ref mNoonTemp, settings, "NoonTemp");
            Import(ref mEveningTemp, settings, "EveningTemp");
            Import(ref mNightTemp, settings, "NightTemp");

            mData = settings.GetList <WeatherData>("Types");
        }
예제 #10
0
        public override void Import(Persistence.Lookup settings)
        {
            base.Import(settings);

            Import(ref mTransitionTime, settings, "TransitionTime");

            mMinIntensityDuration = settings.GetFloat("MinIntensityDuration", 0);

            mIntensityWeights = new List <int>();

            mIntensityWeights.Add(settings.GetInt("LightWeight", 0));
            mIntensityWeights.Add(settings.GetInt("MediumWeight", 0));
            mIntensityWeights.Add(settings.GetInt("HeavyWeight", 0));

            mIntensityChangeWeights = settings.GetList <int>("ChangeWeights", Convert);
        }
예제 #11
0
        public void Import(Persistence.Lookup settings)
        {
            SeasonSettings.Clear();
            foreach (SeasonSettings setting in settings.GetList <SeasonSettings>("Settings"))
            {
                List <SeasonSettings> list;
                if (!SeasonSettings.TryGetValue(setting.Key.Season, out list))
                {
                    list = new List <SeasonSettings>();
                    SeasonSettings.Add(setting.Key.Season, list);
                }

                list.Add(setting);
            }

            Apply();
        }
예제 #12
0
        public void ImportCastes(Persistence.Lookup settings)
        {
            List <CasteOptions> casteOptions = mCasteOptions;

            mCasteOptions       = settings.GetList <CasteOptions>("Castes");
            mCasteOptionsLookup = null;

            if ((mCasteOptions == null) || (mCasteOptions.Count == 0))
            {
                mCasteOptions = casteOptions;
            }
            else
            {
                mNextCasteID = 0;

                ValidateCasteOptions(Castes);
            }
        }
예제 #13
0
 public void Import(Persistence.Lookup settings)
 {
     MasterController.Settings.mFilters = settings.GetList <SavedFilter>("");
 }
예제 #14
0
 public void Import(Persistence.Lookup settings)
 {
     mOptions = settings.GetList <TOption>("Option");
 }
예제 #15
0
 public void Import(Persistence.Lookup settings)
 {
     mSeason   = settings.GetEnum <Season>("Season", Season.Summer);
     mNoSchool = settings.GetBool("NoSchool", false);
     mDays     = settings.GetList <Holiday>("Days");
 }
예제 #16
0
        public void Import(Persistence.Lookup settings)
        {
            mName = settings.GetString("Name");

            mElements = settings.GetList <SimSelection.ICriteria>("Criteria");
        }
예제 #17
0
        public void Import(Persistence.Lookup settings)
        {
            mSeason = settings.GetEnum <Season>("Season", Season.Summer);

            mProfiles = settings.GetList <WeatherProfile>("Profiles");
        }
예제 #18
0
        public void Import(Persistence.Lookup settings)
        {
            Saver.Settings.mSimSaveHour = settings.GetList <float>("SaveHour", Convert);

            Saver.RestartTimers();
        }