protected override bool PrivateUpdate(ScenarioFrame frame) { int autoToastDreams = GetValue <AutoToastDreamsOption, int>(); if (autoToastDreams > 0) { if ((OldHouse != null) && (NewHouse != null)) { foreach (SimDescription sim in CommonSpace.Helpers.Households.All(NewHouse)) { if (sim.CreatedSim == null) { continue; } DreamsAndPromisesManager dnpManager = sim.CreatedSim.DreamsAndPromisesManager; if (dnpManager == null) { continue; } if (dnpManager.mDreamNodes == null) { continue; } int numPromised = dnpManager.NumPromisedDreams(); if (sim.LifetimeWishNode != null) { numPromised--; } if (numPromised > 0) { continue; } IncStat("Dropping Dreams"); int remainingToastDreams = autoToastDreams; while ((remainingToastDreams > 0) && (dnpManager.mDreamNodes.Count > 0)) { dnpManager.CancelDream(dnpManager.mDreamNodes[0]); remainingToastDreams--; IncStat("Dropped Starting Dream"); } } } } UpdateAgingScenario updateAging = new UpdateAgingScenario(); updateAging.Manager = Sims; updateAging.Perform(CommonSpace.Helpers.Households.All(NewHouse), frame); updateAging.Perform(CommonSpace.Helpers.Households.All(OldHouse), frame); return(false); }