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); } }