public override bool Run() { SimDescription description = Actor.SimDescription; if (Actor.IsSelectable) { PlumbBob.SelectActor(Actor); Camera.FocusOnSim(Actor, Pregnancy.kShowPregnancyCameraLerp.Zoom, Pregnancy.kShowPregnancyCameraLerp.Pitch, Pregnancy.kShowPregnancyCameraLerp.Time, true, false); Audio.StartSound("sting_alien_visit"); } description.ShowPregnancy(); AbductionBuffs.ApplyXenogenesis(Actor, Target.SimDescription); ActiveTopic.AddToSim(Actor, "Announce Pregnancy"); /* TODO------------------------------------------------ */ /* Set alarm to give leave at start of third trimester! */ /* ---------------------------------------------------- */ Tutorialette.TriggerLesson(Lessons.Pregnancy, Actor); Actor.PlaySoloAnimation("a_alien_pregnancy_inspectStomach"); /* TODO------------------------------ */ /* Will not remove jobs at this time! */ /* ---------------------------------- */ return(true); }
public override bool Run() { if (Target.InUse) { return(false); } mNPCAbductor = (SimToAbduct != null); if (!mNPCAbductor) { SimToAbduct = GetSelectedObject() as Sim; } if (SimToAbduct == null) { return(false); } StandardEntry(); if (!SetupAbductee()) { StandardExit(); return(false); } Animation.ForceAnimation(Actor.ObjectId, true); Animation.ForceAnimation(Target.ObjectId, true); Target.mTakeOffPos = Actor.Position; if (!Target.RouteToUFOAndTakeOff(Actor)) { StandardExit(); return(false); } Camera.FocusOnGivenPosition(mJig.Position, CarUFO.kAbductLerpParams, true); BeginCommodityUpdates(); bool flag = AbductSim(); EndCommodityUpdates(true); Sim[] sims; if (flag) { EventTracker.SendEvent(EventTypeId.kAbductSimUFO, Actor, SimToAbduct); sims = new Sim[] { Actor, SimToAbduct }; if (mNPCAbductor) { DoTimedLoop(AlienUtils.kAbductionLength, ExitReason.None); } } else { sims = new Sim[] { Actor }; } DateAndTime previous = SimClock.CurrentTime(); Vector3 landRefPos = GetLandingRefPos(mNPCAbductor); while (!Target.TryLandUFOAndExitSims(sims, landRefPos, true)) { Simulator.Sleep(30u); if (SimClock.ElapsedTime(TimeUnit.Minutes, previous) > 30f) { Target.ForceExitUFODueToLandingFailure(sims); break; } } mFromInventory = (mFromInventory || mNPCAbductor); if (mFromInventory) { mFromInventory = Actor.Inventory.TryToAdd(Target); } if (!mFromInventory) { Target.ParkUFO(Actor.LotHome, Actor); } if (flag) { if (mNPCAbductor) { AbductionBuffs.ApplyAbductedEx(SimToAbduct, Actor.SimDescription, false); ThoughtBalloonManager.BalloonData data = new ThoughtBalloonManager.BalloonData(Actor.GetThumbnailKey()); data.BalloonType = ThoughtBalloonTypes.kThoughtBalloon; data.LowAxis = ThoughtBalloonAxis.kDislike; data.Duration = ThoughtBalloonDuration.Medium; data.mPriority = ThoughtBalloonPriority.High; SimToAbduct.ThoughtBalloonManager.ShowBalloon(data); SimToAbduct.PlayReaction(AlienUtils.kAbductionReactions[RandomUtil.GetInt(0, AlienUtils.kAbductionReactions.Length - 1)], ReactionSpeed.NowOrLater); SimToAbduct.ShowTNSIfSelectable(CarUFO.LocalizeString(SimToAbduct.IsFemale, "NPCAbductionTNS", new object[] { SimToAbduct.ObjectId }), StyledNotification.NotificationStyle.kGameMessagePositive, ObjectGuid.InvalidObjectGuid, SimToAbduct.ObjectId); } else { Sim.ForceSocial(Actor, SimToAbduct, "Reveal Prank", InteractionPriorityLevel.High, true); } FinishLinkedInteraction(true); } StandardExit(); if (flag) { WaitForSyncComplete(); } return(flag); }