public void UpdateReferences() { hotairBalloon = FindObjectOfType <HotairBalloon>(); mainCamera = Camera.main; feverRingParentRt = feverRingRt.transform.parent.GetComponent <RectTransform>(); feverRingOuterParentRt = feverRingOuterRt.transform.parent.GetComponent <RectTransform>(); }
public override bool Test(Sim a, HotairBalloon target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { try { if (!(a.Posture is HotairBalloon.InBalloonPosture)) { return(false); } Sim otherSim = target.GetOtherSim(a); if (otherSim == null) { return(false); } // Custom return(ProposalTest(target, a, otherSim, isAutonomous, ref greyedOutTooltipCallback)); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(a, target, e); return(false); } }
public bool TestUse(HotairBalloon obj) { if (!TestRepaired(obj)) return false; if (obj.mCurrentHeight != HotairBalloon.BalloonHeight.OnGround) return false; if (obj.mTargetHeight != HotairBalloon.BalloonHeight.OnGround) return false; return (obj.UseCount == 0); }
public override string GetInteractionName(Sim actor, HotairBalloon target, InteractionObjectPair iop) { if (mWith) { return(Common.LocalizeEAString(actor.IsFemale, "NRaas.Woohooer.GetInWith:MenuName")); } else { return(base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target))); } }
public void UpdateHotairBalloon() { hotairBalloon = FindObjectOfType <HotairBalloon>(); if (hotairBalloon != null) { var balloonCameraTarget = hotairBalloon.transform.Find("Balloon/Balloon Camera Target"); if (balloonCameraTarget != null) { followTarget = balloonCameraTarget.transform; } } }
public bool TestUse(HotairBalloon obj) { if (!TestRepaired(obj)) { return(false); } if (obj.mCurrentHeight != HotairBalloon.BalloonHeight.OnGround) { return(false); } if (obj.mTargetHeight != HotairBalloon.BalloonHeight.OnGround) { return(false); } return(obj.UseCount == 0); }
public PushWooHooOrTryForBaby(HotairBalloon obj, Sim actor, Sim target, bool autonomous, bool pushGetIn, InteractionDefinition definition) { mObject = obj; mActor = actor; mTarget = target; mDefinition = definition; mAutonomous = autonomous; if (pushGetIn) { HotAirBalloonSit entry = mActor.CurrentInteraction as HotAirBalloonSit; if ((entry == null) || (entry.Target != mObject)) { entry = HotAirBalloonSit.Singleton.CreateInstanceWithCallbacks(mObject, mActor, new InteractionPriority(InteractionPriorityLevel.UserDirected), false, true, null, OnActorCompleted, null) as HotAirBalloonSit; if (!mActor.InteractionQueue.Add(entry)) { return; } } entry.mIsMaster = true; HotAirBalloonSit instance = mTarget.CurrentInteraction as HotAirBalloonSit; if ((instance == null) || (instance.Target != mObject)) { instance = HotAirBalloonSit.Singleton.CreateInstanceWithCallbacks(mObject, mTarget, new InteractionPriority(InteractionPriorityLevel.UserDirected), false, true, null, OnCompleted, null) as HotAirBalloonSit; if (!mTarget.InteractionQueue.Add(instance)) { mTargetFail = true; return; } } instance.mIsMaster = false; instance.LinkedInteractionInstance = entry; } else { OnCompleted(mActor, 1); } }
protected override bool Satisfies(Sim actor, Sim target, HotairBalloon obj, bool isAutonomous, ref GreyedOutTooltipCallback callback) { try { if (!base.Satisfies(actor, target, obj, isAutonomous, ref callback)) { return(false); } return(CommonWoohoo.SatisfiesWoohoo(actor, target, "HotAirBalloonWoohoo", isAutonomous, true, true, ref callback)); } catch (ResetException) { throw; } catch (Exception exception) { Common.Exception(actor, target, exception); } return(false); }
public static bool ProposalTest(HotairBalloon ths, Sim a, Sim b, bool autonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if ((ths.mCurrentHeight == HotairBalloon.BalloonHeight.OnGround) || (ths.mTargetHeight == HotairBalloon.BalloonHeight.OnGround)) { return(false); } if (a == b) { return(false); } greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(HotairBalloon.LocalizeString(a.IsFemale, "ProposalTooltip", new object[0x0])); if ((a.SimDescription.IsGhost && !a.SimDescription.IsPlayableGhost) || (b.SimDescription.IsGhost && !b.SimDescription.IsPlayableGhost)) { return(false); } // Custom return(CommonSocials.TestProposeMarriage(a, b, null, autonomous, ref greyedOutTooltipCallback)); }
protected override bool Satisfies(Sim a, Sim target, HotairBalloon obj, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { try { if (!base.Satisfies(a, target, obj, isAutonomous, ref greyedOutTooltipCallback)) { return(false); } return(CommonPregnancy.SatisfiesTryForBaby(a, target, "HotAirBalloonTryForBaby", isAutonomous, true, ref greyedOutTooltipCallback)); } catch (ResetException) { throw; } catch (Exception exception) { Common.Exception(a, target, exception); return(false); } }
public static bool ProposalTest(HotairBalloon ths, Sim a, Sim b, bool autonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if ((ths.mCurrentHeight == HotairBalloon.BalloonHeight.OnGround) || (ths.mTargetHeight == HotairBalloon.BalloonHeight.OnGround)) { return false; } if (a == b) { return false; } greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(HotairBalloon.LocalizeString(a.IsFemale, "ProposalTooltip", new object[0x0])); if ((a.SimDescription.IsGhost && !a.SimDescription.IsPlayableGhost) || (b.SimDescription.IsGhost && !b.SimDescription.IsPlayableGhost)) { return false; } // Custom return CommonSocials.TestProposeMarriage(a, b, null, autonomous, ref greyedOutTooltipCallback); }
public override string GetInteractionName(Sim actor, HotairBalloon target, InteractionObjectPair iop) { return(Common.LocalizeEAString(actor.IsFemale, "Gameplay/Excel/Socializing/Action:NRaasTryForBaby", new object[0])); }
public override string GetInteractionName(Sim actor, HotairBalloon 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 string GetInteractionName(Sim actor, HotairBalloon target, InteractionObjectPair iop) { if (mWith) { return Common.LocalizeEAString(actor.IsFemale, "NRaas.Woohooer.GetInWith:MenuName"); } else { return base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target)); } }
public override bool Test(Sim a, HotairBalloon target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { try { if (!(a.Posture is HotairBalloon.InBalloonPosture)) { return false; } Sim otherSim = target.GetOtherSim(a); if (otherSim == null) { return false; } // Custom return ProposalTest(target, a, otherSim, isAutonomous, ref greyedOutTooltipCallback); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(a, target, e); return false; } }
public void UpdateReferences() { hotairBalloon = FindObjectOfType<HotairBalloon>(); }
public void UpdateReferences() { balloon = FindObjectOfType <BalloonLimiter>().transform; hotairBalloon = FindObjectOfType <HotairBalloon>(); }