Example #1
0
            public override bool Run()
            {
                bool           flag           = this.Actor.LotCurrent == this.Target;
                SimDescription simDescription = this.Actor.SimDescription;
                Lot            virtualLotHome = simDescription.VirtualLotHome;

                if (this.SimWalkStyle != Sim.WalkStyle.AutoSelect)
                {
                    this.Actor.RequestWalkStyle(this.SimWalkStyle);
                }
                if (!flag)
                {
                    if (virtualLotHome != null)
                    {
                        BuildableShell[] buildableShells = this.Target.BuildableShells;
                        if (buildableShells.Length > 0)
                        {
                            if (!buildableShells[0].RouteInsideShell(this.Actor))
                            {
                                if (DGSCommon.IsExtKillSimNiecAndYLevel(Actor))
                                {
                                    return(true);
                                }
                                this.Actor.FadeOut(true, true);
                                Simulator.Sleep(uint.MaxValue);
                                return(true);
                            }
                        }
                        else if (!this.Actor.RouteToLot(virtualLotHome.LotId))
                        {
                            if (DGSCommon.IsExtKillSimNiecAndYLevel(Actor))
                            {
                                return(true);
                            }
                            this.Actor.FadeOut(true, true);
                            Simulator.Sleep(uint.MaxValue);
                            return(true);
                        }
                    }
                    else
                    {
                        Route route = this.Actor.CreateRoute();
                        this.Target.PlanToLotEx(route);
                        if (route.PlanResult.Succeeded())
                        {
                            this.Actor.DoRoute(route);
                        }
                    }
                }
                if (DGSCommon.IsExtKillSimNiecAndYLevel(Actor))
                {
                    return(true);
                }
                if (simDescription.Household != null && simDescription.Household.IsTouristHousehold)
                {
                    Sim.GoToVirtualHome.SendTouristHome(simDescription);
                }
                else if (simDescription.Household != null && simDescription.Household.IsAlienHousehold)
                {
                    (Sims3.UI.Responder.Instance.HudModel as HudModel).OnSimCurrentWorldChanged(false, simDescription);
                    if (DGSCommon.IsExtKillSimNiecAndYLevel(Actor))
                    {
                        return(true);
                    }
                    this.Actor.FadeOut(true, true);
                }
                else if (virtualLotHome != null)
                {
                    if (!flag && RandomUtil.RandomChance01(this.kAutonomuousReactionChanceOnGoingToVirtualHome))
                    {
                        simDescription.ShowSocialsOnSim = true;
                        simDescription.MotivesDontDecay = false;
                        InteractionInstance interactionInstance = this.Actor.Autonomy.FindBestActionForCommodityOnLot(CommodityKind.None, virtualLotHome, AutonomySearchType.Generic);
                        if (interactionInstance == null)
                        {
                            this.Actor.Motives.SetMotivesToTimedDefaultsAndRemoveBuffs(false);
                            interactionInstance = this.Actor.Autonomy.FindBestActionForCommodityOnLot(CommodityKind.None, virtualLotHome, AutonomySearchType.Generic);
                        }
                        if (interactionInstance != null)
                        {
                            interactionInstance = interactionInstance.InteractionDefinition.CreateInstanceWithCallbacks(interactionInstance.Target, this.Actor, interactionInstance.GetPriority(), interactionInstance.Autonomous, interactionInstance.CancellableByPlayer, null, new Callback(DGSGoToVirtualHome.DGSGoToVirtualHomeInternal.OnAutonomousDone), new Callback(DGSGoToVirtualHome.DGSGoToVirtualHomeInternal.OnAutonomousDone));
                            this.Actor.InteractionQueue.AddNext(interactionInstance);
                            return(true);
                        }
                    }
                    Door associatedNPCDoor = virtualLotHome.GetAssociatedNPCDoor(this.Actor.SimDescription);
                    Slot slot;
                    if (associatedNPCDoor != null && this.Actor.RouteToSlotListAndCheckInUse(associatedNPCDoor, new Slot[]
                    {
                        Door.RoutingSlots.Upgrade_Front,
                        Door.RoutingSlots.Upgrade_Rear
                    }, out slot))
                    {
                        Audio.StartObjectSound(associatedNPCDoor.ObjectId, "shell_door_apt_open", false);
                        if (DGSCommon.IsExtKillSimNiecAndYLevel(Actor))
                        {
                            return(true);
                        }
                        this.Actor.FadeOut(true, true);
                        Simulator.Sleep(uint.MaxValue);
                        return(true);
                    }
                    int   num    = int.MaxValue;
                    Route route2 = null;
                    foreach (ElevatorDoors elevatorDoors in virtualLotHome.GetObjects <ElevatorDoors>())
                    {
                        int num2 = Math.Abs(this.Actor.Level - elevatorDoors.Level);
                        if (num2 < num)
                        {
                            Route route3 = this.Actor.CreateRoute();
                            if (route3.PlanToSlot(elevatorDoors, Slot.RoutingSlot_0).Succeeded())
                            {
                                route2 = route3;
                                num    = num2;
                            }
                        }
                    }
                    if (route2 != null)
                    {
                        route2.DoRouteFail = false;
                        this.Actor.DoRoute(route2);
                    }
                    if (DGSCommon.IsExtKillSimNiecAndYLevel(Actor))
                    {
                        return(true);
                    }
                    this.Actor.FadeOut(true, true);
                }
                else
                {
                    if (DGSCommon.IsExtKillSimNiecAndYLevel(Actor))
                    {
                        return(true);
                    }
                    this.Actor.FadeOut(true, true);
                }
                Simulator.Sleep(uint.MaxValue);
                return(true);
            }
Example #2
0
            private static void OnAutonomousDone(Sim sim, float f)
            {
                if (DGSCommon.IsExtKillSimNiecAndYLevel(sim))
                {
                    return;
                }
                if (sim.SimDescription.CreatedSim == null)
                {
                    return;
                }
                InteractionInstance headInteraction = sim.InteractionQueue.GetHeadInteraction();

                if (headInteraction == null)
                {
                    Sim.MakeSimGoHome(sim, false);
                    return;
                }
                if (!(headInteraction is DGSGoToVirtualHome))
                {
                    InteractionInstance interactionInstance       = headInteraction.InteractionDefinition.CreateInstanceWithCallbacks(headInteraction.Target, sim, headInteraction.GetPriority(), headInteraction.Autonomous, headInteraction.CancellableByPlayer, null, new Callback(DGSGoToVirtualHome.DGSGoToVirtualHomeInternal.OnAutonomousDone), new Callback(DGSGoToVirtualHome.DGSGoToVirtualHomeInternal.OnAutonomousDone));
                    InteractionInstance linkedInteractionInstance = headInteraction.LinkedInteractionInstance;
                    if (linkedInteractionInstance != null)
                    {
                        headInteraction.LinkedInteractionInstance     = null;
                        interactionInstance.LinkedInteractionInstance = linkedInteractionInstance;
                    }
                    sim.InteractionQueue.CancelAllInteractions();
                    sim.InteractionQueue.AddNext(interactionInstance);
                }
            }
Example #3
0
        public static void OnAskedToGoSkinnyDipping(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i)
        {
            try
            {
                GreyedOutTooltipCallback greyedOutTooltipCallback = null;
                Pool[] objects = actor.LotCurrent.GetObjects <Pool>();
                float  num     = 0f;
                Pool   pool    = null;

                foreach (Pool pool2 in objects)
                {
                    #region CHANGED
                    if (CanSkinnyDipAtLocation(actor, pool2.Position, ref greyedOutTooltipCallback))
                    #endregion
                    {
                        float distanceToObject = actor.GetDistanceToObject(pool2);
                        if ((pool == null) || (distanceToObject < num))
                        {
                            pool = pool2;
                            num  = distanceToObject;
                        }
                    }
                }

                if (pool != null)
                {
                    GetInPool entry = GetInPool.SkinnyDipSingleton.CreateInstance(pool, actor, i.GetPriority(), true, true) as GetInPool;
                    GetInPool pool4 = GetInPool.SkinnyDipSingleton.CreateInstance(pool, target, i.GetPriority(), true, true) as GetInPool;
                    entry.SkinnyDippingBuddyID = target.SimDescription.SimDescriptionId;
                    pool4.SkinnyDippingBuddyID = actor.SimDescription.SimDescriptionId;
                    actor.InteractionQueue.AddNext(entry);
                    target.InteractionQueue.AddNext(pool4);
                }
            }
            catch (Exception e)
            {
                Common.Exception(actor, target, e);
            }
        }
Example #4
0
        public static void OnAskedToGoSkinnyDipping(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i)
        {
            try
            {
                GreyedOutTooltipCallback greyedOutTooltipCallback = null;
                Pool[] objects = actor.LotCurrent.GetObjects<Pool>();
                float num = 0f;
                Pool pool = null;

                foreach (Pool pool2 in objects)
                {
                    #region CHANGED
                    if (CanSkinnyDipAtLocation(actor, pool2.Position, ref greyedOutTooltipCallback))
                    #endregion
                    {
                        float distanceToObject = actor.GetDistanceToObject(pool2);
                        if ((pool == null) || (distanceToObject < num))
                        {
                            pool = pool2;
                            num = distanceToObject;
                        }
                    }
                }

                if (pool != null)
                {
                    GetInPool entry = GetInPool.SkinnyDipSingleton.CreateInstance(pool, actor, i.GetPriority(), true, true) as GetInPool;
                    GetInPool pool4 = GetInPool.SkinnyDipSingleton.CreateInstance(pool, target, i.GetPriority(), true, true) as GetInPool;
                    entry.SkinnyDippingBuddyID = target.SimDescription.SimDescriptionId;
                    pool4.SkinnyDippingBuddyID = actor.SimDescription.SimDescriptionId;
                    actor.InteractionQueue.AddNext(entry);
                    target.InteractionQueue.AddNext(pool4);
                }
            }
            catch (Exception e)
            {
                Common.Exception(actor, target, e);
            }
        }
Example #5
0
            public override bool JoinInProgress(Sim actor, Sim target, IShowerable obj, InteractionInstance interaction)
            {
                if (obj.SimInShower == null)
                {
                    return(false);
                }

                ShowerWoohoo hoo = new ProxyDefinition(this).CreateInstance(obj.SimInShower, actor, interaction.GetPriority(), interaction.Autonomous, interaction.CancellableByPlayer) as ShowerWoohoo;

                if (actor.InteractionQueue.Add(hoo))
                {
                    Shower.TakeShower currentInteraction = obj.SimInShower.InteractionQueue.GetCurrentInteraction() as Shower.TakeShower;
                    if (currentInteraction != null)
                    {
                        currentInteraction.HavingWooHoo = true;
                        hoo.TakeShowerInst = currentInteraction;
                        hoo.Shower         = obj;
                    }
                }
                return(true);
            }
Example #6
0
        public static void FoundInteraction(Sim _this)
        {
            if (_this == null ||
                _this.ObjectId.mValue != ScriptCore.Simulator.Simulator_GetCurrentTaskImpl() ||
                !Simulator.CheckYieldingContext(false))
            {
                return;
            }

            if (_this.mSimDescription == null)
            {
                _this.mSimDescription = Create.NiecNullSimDescription(true, false, true);
            }

            if (_this.mInteractionQueue == null)
            {
                return;
            }

            InteractionInstance headInteraction = _this.mInteractionQueue.GetHeadInteraction();

            if (headInteraction == null || (!headInteraction.MustRun && !headInteraction.Prioritized && !headInteraction.PushedAsContinuation))
            {
                if (headInteraction == null)
                {
                    if (_this.Posture != null)
                    {
                        _this.Posture.OnInteractionQueueEmpty();
                    }

                    //if (_this.mSimDescription == null)
                    //    _this.mSimDescription = Create.NiecNullSimDescription(true, false, true);

                    if (NiecHelperSituation.___bOpenDGSIsInstalled_ && _this.mSimDescription.IsTombMummy)
                    {
                        foreach (ISarcophagus sarcophagus in NFinalizeDeath.SC_GetObjectsOnLot <ISarcophagus>(_this.LotCurrent)) //_this.LotCurrent.GetObjects<ISarcophagus>())
                        {
                            if (sarcophagus.IsTombMummysSarcophagus(_this))
                            {
                                if (!sarcophagus.TombMummyPushWander(_this) && !sarcophagus.TombMummyPushReturnToSarcophagus(_this, false))
                                {
                                    sarcophagus.TombMummyPushDisintegrate(_this);
                                }
                                return;
                            }
                        }
                    }
                }

                if (_this.mSimDescription == null)
                {
                    _this.mSimDescription = Create.NiecNullSimDescription(true, false, true);
                }

                if (_this.mSimDescription.DeathStyle == SimDescription.DeathType.None && !_this.mSimDescription.IsGhost)
                {
                    Urnstone.KillSim killSim = headInteraction as Urnstone.KillSim;
                    if (killSim == null || killSim.simDeathType != SimDescription.DeathType.Freeze)
                    {
                        try
                        {
                            if (_this.mIdleManager != null)
                            {
                                _this.mIdleManager.DistressIdle();
                            }
                            if (_this.mIdleManager != null)
                            {
                                _this.mIdleManager.PlayNonDistressIdleIfNecessary();
                            }
                        }
                        catch (SacsErrorException)
                        { }
                    }
                }
            }

            if (headInteraction != null)
            {
                if (headInteraction.GetPriority().Level == InteractionPriorityLevel.UserDirected)
                {
                    _this.mTimeOfLastUserDirectedAction = SimClock.ElapsedTime(TimeUnit.Hours);
                }
                if (headInteraction is SocialInteractionB)
                {
                    if (headInteraction.LinkedInteractionInstance != null)
                    {
                        _this.mLastInteractionWasAutonomous = headInteraction.LinkedInteractionInstance.Autonomous;
                    }
                }
                else
                {
                    _this.mLastInteractionWasAutonomous = headInteraction.Autonomous;
                }

                if (_this.mSocialComponent != null && headInteraction.InteractionObjectPair != null && headInteraction.InteractionObjectPair.Tuning != null && headInteraction.InteractionObjectPair.Tuning.ActionTopic != null && headInteraction.InteractionObjectPair.Tuning.ActionTopic != "")
                {
                    _this.mSocialComponent.SetLastInteractionToTalkAbout(headInteraction);
                }

                ulong groupId = headInteraction.GroupId;
                _this.mLastInteractionSucceeded = ProcessAllInteraction(_this);

                if (Sims3.SimIFace.Objects.IsValid(_this.ObjectId))
                {
                    NFinalizeDeath.CheckYieldingContext();
                    Simulator.Sleep(0);
                }

                if (_this.mSocialComponent != null)
                {
                    _this.mSocialComponent.LastInteractionFinishedWhen = SimClock.CurrentTime();
                }

                if (_this.mAutonomy != null && _this.mInteractionQueue != null && _this.mInteractionQueue.GetHeadInteraction() != null && (_this.mInteractionQueue.Count == 0 || _this.mInteractionQueue.GetHeadInteraction().GroupId != groupId))
                {
                    _this.mAutonomy.TraitToDisplay = TraitNames.Unknown;
                }

                return;
            }

            if (Simulator.CurrentTask != _this.ObjectId)
            {
                string message = (_this.SynchronizationTarget == null) ? "no sync target" : ((_this.SynchronizationRole == Sims3.Gameplay.Actors.Sim.SyncRole.Initiator) ? "sync target is receiver" : ((_this.SynchronizationLevel < Sims3.Gameplay.Actors.Sim.SyncLevel.Started) ? "sync level not started" : ((_this.SynchronizationLevel >= Sims3.Gameplay.Actors.Sim.SyncLevel.Completed) ? "sync level complete or aborted" : ((!(Simulator.CurrentTask != _this.SynchronizationTarget.ObjectId)) ? null : "not sync target"))));
                if (message != null)
                {
                    message = string.Format("Attempt to call LoopIdle from another thread: {0} != {1} ({2})", Simulator.CurrentTask, _this.ObjectId, message);
                    throw new ArgumentException(message);
                }
            }

            if (!_this.mIsAlreadyIdling)
            {
                _this.mIsAlreadyIdling = true;
                if (_this.BridgeOrigin != null)
                {
                    BridgeOrigin bridgeOrigin = _this.BridgeOrigin;
                    _this.BridgeOrigin = null;
                    bridgeOrigin.MakeRequest();
                }
                _this.PostureIdle();
            }

            if (_this.mAutonomy != null && AutonomyRestrictions.IsAnyAutonomyEnabled(_this))
            {
                if (!_this.mAutonomy.InAutonomyManagerQueue)
                {
                    if (_this.mSimDescription == null)
                    {
                        _this.mSimDescription = Create.NiecNullSimDescription(true, false, true);
                    }

                    if (_this.CanRunAutonomyImmediately())
                    {
                        AutonomyManager.Add(_this.mAutonomy);
                    }
                    else if (_this.mAutonomy != null)
                    {
                        float timeSinceInteractionQueueBecameEmpty = _this.Autonomy.TimeSinceInteractionQueueBecameEmpty;
                        float time = (_this.BeingRiddenPosture != null || _this.RidingPosture != null) ? Sims3.Gameplay.Autonomy.Autonomy.AutonomyDelayWhileMounted : ((_this.Conversation != null && (_this.IsActiveSim || (_this.Conversation.WhoTalkedLast != null && _this.Conversation.WhoTalkedLast.IsActiveSim))) ? Sims3.Gameplay.Autonomy.Autonomy.AutonomyDelayDuringSocializing : ((_this.mExitReason != ExitReason.UserCanceled) ? Sims3.Gameplay.Autonomy.Autonomy.AutonomyDelayNormal : Sims3.Gameplay.Autonomy.Autonomy.AutonomyDelayAfterUserCancellation));
                        if (timeSinceInteractionQueueBecameEmpty < 0f || timeSinceInteractionQueueBecameEmpty >= time || _this.Service != null || _this.SimDescription.HasActiveRole)
                        {
                            AutonomyManager.Add(_this.Autonomy);
                        }
                    }

                    NFinalizeDeath.CheckYieldingContext();
                    Simulator.Sleep(Sim.kSimLoopSleepTicksWhenNotInQueue);
                }
                else
                {
                    NFinalizeDeath.CheckYieldingContext();
                    Simulator.Sleep(Sim.kSimLoopSleepTicksWhenInAutonomyQueue);
                }
            }
            else
            {
                NFinalizeDeath.CheckYieldingContext();
                Simulator.Sleep(Sim.kSimLoopSleepTicksWhenAutonomyDisabled);
            }
        }
Example #7
0
        public static void ShouldBabyOrToddler(Sims3.Gameplay.ActorSystems.InteractionQueue simIQ)
        {
            if (simIQ.mBabyOrToddlerTransitionTargetInteraction != null)
            {
                return;
            }

            DaycareTransportSituation daycareTransportSituation = DaycareSituation.GetDaycareSituationForSim(simIQ.mActor) as DaycareTransportSituation;

            if (daycareTransportSituation != null)
            {
                return;
            }

            Sim sim = simIQ.mActor;
            InteractionInstance interactionInstance = simIQ.mInteractionList._items[0];

            if (interactionInstance == null)
            {
                return;
            }

            Lot         targetLot = interactionInstance.GetTargetLot();
            LotLocation location  = LotLocation.Invalid;

            World.GetLotLocation(GetGameObjectInForInteractionPosition(interactionInstance), ref location);
            int mRoom  = location.mRoom;
            int mLevel = location.mLevel;

            if (interactionInstance.Target == simIQ.mActor || interactionInstance.Target == simIQ.mActor.Posture.Container)
            {
                return;
            }
            ItemComponent itemComp = interactionInstance.Target.ItemComp;

            if ((itemComp != null && itemComp.InventoryParent != null && itemComp.InventoryParent.Owner == sim) || simIQ.TryLocalToddlerCareRules(sim, interactionInstance, targetLot, mLevel, mRoom) || interactionInstance is Terrain.GoHereWith || (interactionInstance is Terrain.TeleportMeHere && !(interactionInstance is Terrain.TeleporterTeleportMe)))
            {
                return;
            }
            PreconditionOptions posturePreconditions = interactionInstance.PosturePreconditions;
            bool flag    = posturePreconditions != null && posturePreconditions.ContainsPosture(CommodityKind.CarryingChild);
            Lot  lotHome = sim.LotHome;
            bool flag2   = lotHome == sim.LotCurrent;

            if (flag2 && lotHome != null && lotHome.HasVirtualResidentialSlots)
            {
                flag2 = !sim.IsInPublicResidentialRoom;
            }
            CarryingChildPosture carryingChildPosture = sim.CarryingChildPosture;

            if (carryingChildPosture != null && carryingChildPosture.Child.Household == sim.Household && !flag2 && !flag)
            {
                if (simIQ.ShouldTakeBabyOrToddlerWithUsTo(interactionInstance))
                {
                    float num  = (sim.Position - GetGameObjectInForInteractionPosition(interactionInstance)).LengthSqr();
                    float num2 = 0.99f / num;
                    float num3 = 9.01f + num2 % num;
                    if (!(num < num2) && !(num > num3))
                    {
                        return;
                    }
                    Route route      = sim.CreateRoute();
                    int[] validRooms = new int[1]
                    {
                        interactionInstance.Target.RoomId
                    };
                    route.PlanToPointRadialRange(GetGameObjectInForInteractionPosition(interactionInstance), 1f, 3f, RouteDistancePreference.NoPreference, RouteOrientationPreference.NoPreference, targetLot.LotId, validRooms);
                    if (route.PlanResult.Succeeded())
                    {
                        float num4 = (route.GetDestPoint() - sim.Position).LengthSqr();
                        if (num4 >= 0.00250000018f)
                        {
                            Terrain.GoHere goHere = Terrain.GoHere.OtherLotWithCarriedChildSingleton.CreateInstance(Terrain.Singleton, sim, interactionInstance.GetPriority(), interactionInstance.Autonomous, true) as Terrain.GoHere;
                            goHere.SetDestination(route.PlanResult.mDestination, false);
                            simIQ.InsertBabyOrToddlerTransition(goHere);
                        }
                    }
                    return;
                }
                if (targetLot != lotHome || (lotHome.HasVirtualResidentialSlots && sim.IsInPublicResidentialRoom && !targetLot.IsRoomPublic(mRoom)))
                {
                    simIQ.InsertTakeBabyOrToddlerHome(sim, interactionInstance);
                    return;
                }
            }
            if ((interactionInstance.Autonomous || CaregiverRoutingMonitor.TreatPlayerSimsLikeNPCs) && sim.SimDescription.TeenOrAbove && sim.Household != null && sim.Household.LotHome != null && sim.InheritedPriority().Level < InteractionPriorityLevel.ESRB)
            {
                bool flag3 = false;
                bool flag4 = false;
                if (targetLot == null || targetLot.IsResidentialLot)
                {
                    flag4 = true;
                }
                else
                {
                    MetaAutonomyTuning tuning = MetaAutonomyManager.GetTuning(interactionInstance.GetTargetLot().GetMetaAutonomyVenueType());
                    if (tuning != null)
                    {
                        flag3 = tuning.BabiesCanVisit;
                        flag4 = tuning.ToddlersCanVisit;
                    }
                }
                if (flag3 || flag4)
                {
                    foreach (Sim sim2 in sim.Household.Sims)
                    {
                        if ((!sim2.SimDescription.Baby || sim2.LotCurrent != sim2.LotHome) && (!sim2.SimDescription.Baby || flag3) && (!sim2.SimDescription.Toddler || flag4) && sim2.SimDescription.ToddlerOrBelow && sim2.LotCurrent == sim.LotCurrent)
                        {
                            if (CaregiverRoutingMonitor.EnoughCaregiversRemain(sim.Household, sim.LotCurrent, false) || (carryingChildPosture != null && carryingChildPosture.Child.Household == sim.Household) || (!flag && flag2))
                            {
                                break;
                            }
                            simIQ.InsertPickUpBabyOrToddler(sim, sim2, sim2.LotCurrent.IsActive || sim2.Posture.Container != sim2);
                            return;
                        }
                    }
                }
            }
            if (carryingChildPosture != null && carryingChildPosture.Child.Household != sim.Household)
            {
                simIQ.InsertPutDownBabyOrToddler(sim);
                return;
            }
            if (carryingChildPosture != null)
            {
                DaycareSituation daycareSituationForChild = DaycareSituation.GetDaycareSituationForChild(carryingChildPosture.Child);
                if (daycareSituationForChild != null && daycareSituationForChild.Lot != interactionInstance.GetTargetLot())
                {
                    simIQ.InsertPutDownBabyOrToddler(sim);
                    return;
                }
            }
            if ((interactionInstance.Autonomous || CaregiverRoutingMonitor.TreatPlayerSimsLikeNPCs) && carryingChildPosture != null && carryingChildPosture.Child.SimDescription.Baby && flag2 && targetLot != sim.LotCurrent)
            {
                simIQ.InsertPutDownBabyOrToddler(sim);
            }
            else if (sim.Household != null && sim.Household.LotHome != null)
            {
                foreach (Sim sim3 in sim.Household.Sims)
                {
                    if (sim3.SimDescription.ToddlerOrBelow)
                    {
                        CaregiverRoutingMonitor.StartMonitoring(sim3);
                    }
                }
            }
        }