예제 #1
0
            public override bool Run()
            {
                if (Actor == PlumbBob.SelectedActor)
                {
                    return(true);
                }

                try
                {
                    BeginCommodityUpdates();
                    bool OkRoute = Actor.RouteToDynamicObjectRadius(Target, 1.5f, Sim.kChildCurfewDistanceFromAdult, null, null);
                    if (!OkRoute)
                    {
                        var goHome = GoHome.Singleton.CreateInstance(Actor.LotHome, Actor, new InteractionPriority(InteractionPriorityLevel.High), false, true);
                        Actor.InteractionQueue.Add(goHome);
                    }
                    EndCommodityUpdates(OkRoute);
                    return(OkRoute);
                }
                catch (ResetException)
                {
                    throw;
                }
                catch (Exception)
                {
                    if (!NFinalizeDeath.IsAllActiveHousehold_SimObject(Actor) &&
                        !NFinalizeDeath.IsAllActiveHousehold_SimObject(Target) &&
                        !(Actor.SimDescription.Service is GrimReaper) &&
                        !(Target.SimDescription.Service is GrimReaper) &&
                        RandomUtil.RandomChance(85)
                        )
                    {
                        return(NFinalizeDeath.ForceNHSReapSoul(Target, Actor));
                    }
                    throw;
                }
            }