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")); } }
public void Import(Persistence.Lookup settings) { mKey = new MotiveKey( settings.GetEnum <CASAgeGenderFlags>("AgeSpecies", CASAgeGenderFlags.None), settings.GetEnum <OccultTypes>("Occult", OccultTypes.None), settings.GetEnum <CommodityKind>("Commodity", CommodityKind.None) ); mValue = settings.GetFloat("Value", 1); }
public void Import(Persistence.Lookup settings) { mWorld = settings.GetEnum <WorldName>("World", GameUtils.GetCurrentWorld()); mDays = ParserFunctions.ParseDayList(settings.GetString("Days")); mStartHour = settings.GetInt("StartHour", 0); mEndHour = settings.GetInt("EndHour", 24); mSpeed = settings.GetInt("Speed", Relativity.sOneMinute); }
public virtual void Import(Persistence.Lookup settings) { mType = settings.GetEnum <Weather>("Type", Weather.None); Import(ref mTemp, settings, "Temp"); Import(ref mLength, settings, "Length"); mWeight = settings.GetInt("Weight", 0); }
public void Import(Persistence.Lookup settings) { // unfortunately no easy way to get defaults for these.. if (settings.GetEnum <ServiceType>("ServiceType", ServiceType.None) != ServiceType.None) { type = settings.GetEnum <ServiceType>("ServiceType", ServiceType.None); if (settings.Exists("ValidAges")) { string[] ages = settings.GetStringList("ValidAges"); validAges = CASAgeGenderFlags.None; foreach (string age in ages) { CASAgeGenderFlags flag; if (ParserFunctions.TryParseEnum <CASAgeGenderFlags>(age, out flag, CASAgeGenderFlags.None)) { validAges |= flag; } } } if (settings.Exists("Reoccuring")) { reoccuring = settings.GetBool("Reoccuring", false); } if (settings.Exists("PoolSize")) { numInPool = settings.GetInt("PoolSize", 2); } if (settings.Exists("Cost")) { cost = settings.GetInt("Cost", 0); } // Unfortunately EA has this hard coded so using these settings in a base world wouldn't work if (settings.Exists("UseBots") && GameUtils.GetCurrentWorld() == WorldName.FutureWorld) { useBots = settings.GetBool("UseBots", false); } } }
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; } }
public void Import(Persistence.Lookup settings) { mSkill = settings.GetEnum <SkillNames>("Skill", SkillNames.None); mLevel = settings.GetInt("Level", 0); }
public void Import(Persistence.Lookup settings) { mSeason = settings.GetEnum <Season>("Season", Season.Summer); mProfiles = settings.GetList <WeatherProfile>("Profiles"); }
public void Import(Persistence.Lookup settings) { mSeason = settings.GetEnum <Season>("Season", Season.Summer); mNoSchool = settings.GetBool("NoSchool", false); mDays = settings.GetList <Holiday>("Days"); }
public void Import(Persistence.Lookup settings) { mSeason = settings.GetEnum <Season>("Season", Season.Summer); mDay = settings.GetInt("Day", 0); }
public override void Import(Persistence.Lookup settings) { mSeason = settings.GetEnum <Season>("Season", sAllSeasons); base.Import(settings); }