Пример #1
0
 public void Import(Persistence.Lookup settings)
 {
     mSeason = settings.GetEnum<Season>("Season", Season.Summer);
     mNoSchool = settings.GetBool("NoSchool", false);
     mDays = settings.GetList<Holiday>("Days");
 }
Пример #2
0
            public void Import(Persistence.Lookup settings)
            {
                mName = settings.GetString("Name");
                if (settings.Exists("Autonomous"))
                {
                    mAutonomous = settings.GetBool("Autonomous", false);
                    mFlags |= Flags.Autonomous;
                }

                if (settings.Exists("UserDirected"))
                {
                    mUserDirected = settings.GetBool("UserDirected", false);
                    mFlags |= Flags.UserDirected;
                }

                if (settings.Exists("AgeSpecies"))
                {
                    mAgeSpecies = settings.GetEnum<CASAGSAvailabilityFlags>("AgeSpecies", CASAGSAvailabilityFlags.None);
                    mFlags |= Flags.AgeSpecies;

                    mAgeSpeciesList = null;
                }

                if (settings.Exists("Availability"))
                {
                    mAvailability = settings.GetEnum<Availability.FlagField>("Availability", Availability.FlagField.None);
                    mFlags |= Flags.Availability;
                }

                if (settings.Exists("Advertised"))
                {
                    mAdvertisedOutputs.Clear();
                    ParseAdvertised(settings.GetStringList("Advertised"));
                }
            }
Пример #3
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");
        }
Пример #4
0
            public void Import(Persistence.Lookup settings)
            {
                mName = settings.GetString("Name");
                if (settings.Exists("Autonomous"))
                {
                    mAutonomous = settings.GetBool("Autonomous", false);
                    mFlags |= Flags.Autonomous;
                }

                if (settings.Exists("UserDirected"))
                {
                    mUserDirected = settings.GetBool("UserDirected", false);
                    mFlags |= Flags.UserDirected;
                }

                if (settings.Exists("AllowPregnant"))
                {
                    mAllowPregnant = settings.GetBool("AllowPregnant", false);
                    mFlags |= Flags.AllowPregnant;
                }

                if (settings.Exists("ActorAgeSpecies"))
                {
                    mActorAgeSpecies = settings.GetEnum<CASAGSAvailabilityFlags>("ActorAgeSpecies", CASAGSAvailabilityFlags.None);
                    mFlags |= Flags.ActorAgeSpecies;

                    mActorAgeSpeciesList = null;
                }

                if (settings.Exists("TargetAgeSpecies"))
                {
                    mTargetAgeSpecies = settings.GetEnum<CASAGSAvailabilityFlags>("TargetAgeSpecies", CASAGSAvailabilityFlags.None);
                    mFlags |= Flags.TargetAgeSpecies;

                    mTargetAgeSpeciesList = null;
                }
            }