public override bool Test(Sim a, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (!Jetpack.IsAllowedToUseJetpack(a)) { return(false); } if (isAutonomous) { if (!a.Inventory.ContainsType(typeof(Jetpack), 0x1)) { return(false); } } else if (a.GetActiveJetpack() == null) { return(false); } /* * if (a.SimDescription.IsVisuallyPregnant) * { * greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString(a.SimDescription.IsFemale, "Gameplay/ActorSystems/OccultImaginaryFriend:ImaginaryFriendModeDisabledPregnancy", new object[] { a.SimDescription })); * return false; * } */ SocialJig socialjig = null; if (!Jetpack.CheckSpaceForFlyAroundJig(a, target, ref socialjig, true, true)) { greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString("Gameplay/Objects/EP11/Jetpack:NotEnoughSpace", new object[] { target })); return(false); } return(true); }
public static bool OnTest(Sim actor, Sim target, ActiveTopic topic, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { try { if (!Jetpack.JetpackTestCommon(actor, target)) { greyedOutTooltipCallback = Common.DebugTooltip("TestCommon Denied"); return(false); } if (actor.SkillManager.GetSkillLevel(SkillNames.Future) < SocialTest.kFutureSkillRequiredJetpackWoohoo) { greyedOutTooltipCallback = Common.DebugTooltip("Skill Denied"); return(false); } SocialJig socialjig = null; if (!Jetpack.CheckSpaceForFlyAroundJig(actor, target, ref socialjig, true, true)) { greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString("Gameplay/Objects/EP11/Jetpack:NotEnoughSpace", new object[] { target })); return(false); } if (!Woohooer.Settings.mAutonomousJetPack) { greyedOutTooltipCallback = Common.DebugTooltip("Location Denied"); return(false); } return(CommonPregnancy.SatisfiesTryForBaby(actor, target, "JetPackTryForBaby", isAutonomous, true, ref greyedOutTooltipCallback)); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(actor, target, e); return(false); } }
public override bool Run() { try { if (!IntroTutorial.IsRunning || IntroTutorial.AreYouExitingTutorial()) { SocialJig = GlobalFunctions.CreateObjectOutOfWorld("horseMountDismountJig", ProductVersion.EP5) as SocialJig; SocialJig.RegisterParticipants(Actor, Target); bool succeeded = false; if (!BeginSocialInteraction(new SocialInteractionB.Definition(null, Saddle.LocalizeString(Target.IsFemale, "HaveOutfitEdited", new object[0x0]), false), true, false)) { return(succeeded); } StandardEntry(); if (Responder.Instance.OptionsModel.SaveGameInProgress) { BeginCommodityUpdates(); EndCommodityUpdates(true); StandardExit(); return(true); } mTookSemaphore = GameStates.WaitForInteractionStateChangeSemaphore(Target, ~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached)); if (!mTookSemaphore) { StandardExit(); return(false); } if (Target.IsSelectable) { while ((Sims3.Gameplay.Gameflow.CurrentGameSpeed == Sims3.Gameplay.Gameflow.GameSpeed.Pause) || MoveDialog.InProgress()) { SpeedTrap.Sleep(); } BeginCommodityUpdates(); SimDescription simDescription = Target.SimDescription; if (simDescription == null) { throw new Exception("ChangeOutfit: sim doesn't have a description!"); } CASChangeReporter.Instance.ClearChanges(); new Sims.Dresser().Perform(new GameHitParameters <GameObject>(Target, Target, GameObjectHit.NoHit)); while (GameStates.NextInWorldStateId != InWorldState.SubState.LiveMode) { SpeedTrap.Sleep(); } EndCommodityUpdates(true); /* * if (Target.CurrentOutfitIndex > simDescription.GetOutfitCount(Target.CurrentOutfitCategory)) * { * Target.UpdateOutfitInfo(); * } * * (Responder.Instance.HudModel as Sims3.Gameplay.UI.HudModel).NotifySimChanged(Target.ObjectId); */ StandardExit(); return(true); } StandardExit(); } return(false); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); } return(false); }