public static void ApplyPostShowerEffects(Sim actor, IShowerable shower) { BuffManager buffManager = actor.BuffManager; buffManager.RemoveElement(BuffNames.Singed); buffManager.RemoveElement(BuffNames.SingedElectricity); buffManager.RemoveElement(BuffNames.GarlicBreath); SimDescription simDescription = actor.SimDescription; simDescription.RemoveFacePaint(); if (simDescription.IsMummy) { buffManager.AddElement(BuffNames.Soaked, Origin.FromShower); } if (RandomUtil.RandomChance((float)shower.TuningShower.ChanceOfExhileratingShowerBuff)) { buffManager.AddElement(BuffNames.ExhilaratingShower, Origin.FromNiceShower); } if (actor.HasTrait(TraitNames.Hydrophobic)) { actor.PlayReaction(ReactionTypes.Cry, shower as GameObject, ReactionSpeed.AfterInteraction); } else if (shower.ShouldGetColdShower) { actor.BuffManager.AddElement(BuffNames.ColdShower, Origin.FromCheapShower); EventTracker.SendEvent(EventTypeId.kGotColdShowerBuff, actor, shower); } // Custom else if ((shower.Cleanable != null) && (shower.Cleanable.NeedsToBeCleaned)) { actor.PlayReaction(ReactionTypes.Retch, shower as GameObject, ReactionSpeed.AfterInteraction); } actor.Motives.SetMax(CommodityKind.Hygiene); }
public override bool Test(Sim a, IShowerable target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (target.Repairable == null) { return(false); } return(base.Test(a, target, isAutonomous, ref greyedOutTooltipCallback)); }
protected override bool Satisfies(Sim actor, Sim target, IShowerable obj, bool isAutonomous, ref GreyedOutTooltipCallback callback) { if (!base.Satisfies(actor, target, obj, isAutonomous, ref callback)) { return(false); } return(CommonPregnancy.SatisfiesTryForBaby(actor, target, "ShowerTryForBaby", isAutonomous, true, ref callback)); }
protected override bool Satisfies(Sim actor, Sim target, IShowerable obj, bool isAutonomous, ref GreyedOutTooltipCallback callback) { if (!base.Satisfies(actor, target, obj, isAutonomous, ref callback)) { return(false); } return(CommonWoohoo.SatisfiesWoohoo(actor, target, "ShowerWoohoo", isAutonomous, true, true, ref callback)); }
public bool TestUse(IShowerable obj) { if (!TestRepaired(obj)) { return(false); } if (obj.Repairable == null) { // Take Shower requires a Repairable component return(false); } // Exclude Outdoor showers if (obj.GetType().ToString().Contains("ShowerOutdoor")) { return(false); } return(obj.UseCount == 0 && obj.InWorld); }
public override string GetInteractionName(Sim actor, IShowerable target, InteractionObjectPair iop) { return base.GetInteractionName(actor, target, new InteractionObjectPair(Shower.TakeShower.Singleton, target)); }
public override bool Test(Sim a, IShowerable target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { return(!isAutonomous || ((a.Autonomy.Motives.GetValue(CommodityKind.Hygiene) < 100f) && !a.SimDescription.IsFrankenstein)); }
public override string GetInteractionName(Sim actor, IShowerable target, InteractionObjectPair iop) { return(base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target))); }
public override bool Test(Sim a, IShowerable target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { return (!isAutonomous || ((a.Autonomy.Motives.GetValue(CommodityKind.Hygiene) < 100f) && !a.SimDescription.IsFrankenstein)); }
public override string GetInteractionName(Sim actor, IShowerable target, InteractionObjectPair iop) { return(Common.LocalizeEAString(actor.IsFemale, "Gameplay/Excel/Socializing/Action:NRaasTryForBaby", new object[0])); }
public override string GetInteractionName(Sim actor, IShowerable target, InteractionObjectPair iop) { return(Common.LocalizeEAString(actor.IsFemale, "Gameplay/Excel/Socializing/Action:NRaasRiskyWooHoo", new object[0]) + Common.LocalizeEAString(false, "NRaas.Woohooer:RiskyChance", new object[] { Woohooer.Settings.GetRiskyBabyMadeChance(actor) })); }
public override bool Test(Sim a, IShowerable target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (target.Repairable == null) return false; return base.Test(a, target, isAutonomous, ref greyedOutTooltipCallback); }