public override bool Run() // Run { if (Actor.IsInActiveHousehold) { Actor.Autonomy.SituationComponent.Situations.Add(NiecHelperSituation.Create(Actor.LotCurrent, Actor)); } SpeedTrap.Sleep(0); NiecHelperSituation situationOfType = Actor.GetSituationOfType <NiecHelperSituation>(); if (situationOfType != null) { StyledNotification.Show(new StyledNotification.Format("Check Ok", StyledNotification.NotificationStyle.kGameMessagePositive)); if (Target != Actor) { Actor.InteractionQueue.Add(NiecHelperSituation.NiecAppear.Singleton.CreateInstance(Target, Actor, new InteractionPriority((InteractionPriorityLevel)999, 999f), isAutonomous: false, cancellableByPlayer: false)); } } else { StyledNotification.Show(new StyledNotification.Format("Check Failed", StyledNotification.NotificationStyle.kGameMessagePositive)); } return(true); }
public override bool Run() // Run { try { if (GrimReaper.Instance.mPool.Count == 0) { if (Actor.IsInActiveHousehold) { var nhs = NiecHelperSituation.Create(Actor.LotCurrent, Actor); if (nhs != null) { Actor.Autonomy.SituationComponent.Situations.Add(nhs); } SpeedTrap.Sleep(0); NiecHelperSituation situationOfType = Actor.GetSituationOfType <NiecHelperSituation>(); if (situationOfType != null) { StyledNotification.Show(new StyledNotification.Format("Check Ok", StyledNotification.NotificationStyle.kGameMessagePositive)); if (Target != Actor) { Actor.InteractionQueue.Add(NiecHelperSituation.NiecAppear.Singleton.CreateInstance(Target, Actor, new InteractionPriority((InteractionPriorityLevel)999, 999f), isAutonomous: false, cancellableByPlayer: false)); } } else { StyledNotification.Show(new StyledNotification.Format("Check Failed", StyledNotification.NotificationStyle.kGameMessagePositive)); } } Sim ActiveActor = NFinalizeDeath.ActiveActor; foreach (var item in NFinalizeDeath.SC_GetObjects <Sim>()) { if (item == ActiveActor) { continue; } if (item.mSimDescription == null || !NiecHelperSituation.UnsafeRunReapSoul(item)) { continue; } if (item.SimDescription.ChildOrBelow) { continue; } SpeedTrap.Sleep(0); NiecHelperSituation situationOfTypex = item.GetSituationOfType <NiecHelperSituation>(); if (situationOfTypex != null) { if (Target != item) { item.InteractionQueue.Add(NiecHelperSituation.NiecAppear.Singleton.CreateInstance(Target, item, new InteractionPriority((InteractionPriorityLevel)100, 999f), isAutonomous: false, cancellableByPlayer: true)); } } else { var nhs = NiecHelperSituation.Create(Actor.LotCurrent, Actor); if (nhs != null) { item.Autonomy.SituationComponent.Situations.Add(nhs); } else { continue; } situationOfTypex = nhs; if (Target != item) { item.InteractionQueue.Add((!situationOfTypex.OkSuusse ? Sims3.Gameplay.NiecRoot.NiecHelperSituation.NiecAppear.Singleton : NiecHelperSituation.ReapSoul.Singleton).CreateInstance(Target, item, new InteractionPriority((InteractionPriorityLevel)100, 999f), isAutonomous: false, cancellableByPlayer: true)); } } break; } } else if (Actor.IsInActiveHousehold) { var nhs = NiecHelperSituation.Create(Actor.LotCurrent, Actor); if (nhs != null) { Actor.Autonomy.SituationComponent.Situations.Add(nhs); } SpeedTrap.Sleep(0); NiecHelperSituation situationOfType = Actor.GetSituationOfType <NiecHelperSituation>(); if (situationOfType != null) { StyledNotification.Show(new StyledNotification.Format("Check Ok", StyledNotification.NotificationStyle.kGameMessagePositive)); if (Target != Actor) { Actor.InteractionQueue.Add(NiecHelperSituation.NiecAppear.Singleton.CreateInstance(Target, Actor, new InteractionPriority((InteractionPriorityLevel)999, 999f), isAutonomous: false, cancellableByPlayer: false)); } } else { StyledNotification.Show(new StyledNotification.Format("Check Failed", StyledNotification.NotificationStyle.kGameMessagePositive)); } } } catch (ResetException) { throw; } catch { } return(true); }