public override bool Test(Sim a, HotTubBase target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { try { HotTubPosture posture = a.Posture as HotTubPosture; if (posture == null) { return(false); } if (posture.Container != target) { return(false); } if (a.IsSkinnyDipping()) { return(false); } // Custom return(CommonSkinnyDip.CanSkinnyDipAtLocation(a, target.Position, ref greyedOutTooltipCallback, false, true)); } catch (Exception e) { Common.Exception(a, target, e); return(false); } }
public override bool Test(Sim a, HotTubBase target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { try { if ((target.Repairable != null) && (target.Repairable.Broken)) { return(false); } HotTubPosture posture = a.Posture as HotTubPosture; if ((posture != null) && (posture.Container == target)) { return(false); } if (target.mSimsAreWooHooing) { return(false); } if (isAutonomous && a.HasTrait(TraitNames.Hydrophobic)) { return(false); } if (target.SeatingGroup.Count == target.UseCount) { greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(HotTubBase.LocalizeString(a.IsFemale, "AllSeatsTaken", new object[0x0])); return(false); } if (a.CurrentOutfitCategory == OutfitCategories.SkinnyDippingTowel) { greyedOutTooltipCallback = new GrayedOutTooltipHelper(a.IsFemale, "ClothesStolenTooltip", null).GetTooltip; return(false); } if (HotTubBase.StressExitFromHeat(a, ref greyedOutTooltipCallback)) { return(false); } if (IsSkinnyDipping) { // Custom return(CommonSkinnyDip.CanSkinnyDipAtLocation(a, target.Position, ref greyedOutTooltipCallback, false, true)); } return(true); } catch (Exception e) { Common.Exception(a, target, e); return(false); } }