protected override bool PrivateUpdate(ScenarioFrame frame) { Dictionary <CareerLocation, JobNeed> locations = new Dictionary <CareerLocation, JobNeed>(); foreach (SimDescription sim in Careers.Employed) { Career career = sim.Occupation as Career; if (career == null) { continue; } if (ManagerCareer.IsPlaceholderCareer(career)) { continue; } if (career.CareerLoc == null) { continue; } if (!NewBossScenario.NeedsBoss(career, true)) { continue; } if ((career.Boss == null) && (career.CurLevel.NextLevels.Count > 0)) { JobNeed need; if (!locations.TryGetValue(career.CareerLoc, out need)) { need = new JobNeed(); locations.Add(career.CareerLoc, need); } if (SimTypes.IsSelectable(sim)) { need.mNeed += 10; } else { need.mNeed++; } if ((need.Sim == null) || (need.Sim.Occupation.CareerLevel < sim.Occupation.CareerLevel)) { need.Sim = sim; } } } int maxNeed = 0; foreach (JobNeed need in locations.Values) { if ((mRequirement.mCareerSim == null) || (maxNeed < need.mNeed)) { maxNeed = need.mNeed; mRequirement.mCareerSim = need.Sim; } } return(true); }
protected NewBossScenario(NewBossScenario scenario) : base(scenario) { mIncreasePressure = scenario.mIncreasePressure; }