コード例 #1
0
ファイル: SkinnyDipFromHotTub.cs プロジェクト: yakoder/NRaas
            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);
                }
            }
コード例 #2
0
            public bool TestUse(HotTubBase obj)
            {
                if (!TestRepaired(obj))
                {
                    return(false);
                }

                return(obj.UseCount == 0 && obj.InWorld);
            }
コード例 #3
0
ファイル: HotTubGetIn.cs プロジェクト: yakoder/NRaas
            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);
                }
            }
コード例 #4
0
ファイル: HotTubGetIn.cs プロジェクト: yakoder/NRaas
 public override string GetInteractionName(Sim actor, HotTubBase target, InteractionObjectPair iop)
 {
     if (IsSkinnyDipping)
     {
         return(Localization.LocalizeString(HotTubBase.sLocalizationKey + "/GetIn:SkinnyDipInteractionName", new object[0x0]));
     }
     else
     {
         return(base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target)));
     }
 }
コード例 #5
0
        private new void OnAnimationEvent(StateMachineClient smc, IEvent evt)
        {
            HotTubBase container = Actor.Posture.Container as HotTubBase;

            if (evt.EventId == 0x6e)
            {
                container.StartWoohooFX();
                StartJealousyBroadcaster();
            }
            else if (evt.EventId == 0x6f)
            {
                container.StopWoohooFX();
            }
        }
コード例 #6
0
            protected override bool Satisfies(Sim a, Sim target, HotTubBase obj, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                try
                {
                    if (!base.Satisfies(a, target, obj, isAutonomous, ref greyedOutTooltipCallback))
                    {
                        return(false);
                    }

                    return(CommonPregnancy.SatisfiesTryForBaby(a, target, "HotTubTryForBaby", isAutonomous, true, ref greyedOutTooltipCallback));
                }
                catch (Exception exception)
                {
                    Common.Exception(a, target, exception);
                }
                return(false);
            }
コード例 #7
0
        protected void OnBabyCheck(StateMachineClient smc, IEvent evt)
        {
            IWooHooDefinition definition = InteractionDefinition as IWooHooDefinition;

            if (CommonPregnancy.IsSuccess(Actor, Target, Autonomous, definition.GetStyle(this)))
            {
                Pregnancy pregnancy = CommonPregnancy.Impregnate(Actor, Target, Autonomous, definition.GetStyle(this));
                if (pregnancy != null)
                {
                    HotTubBase container = Actor.Posture.Container as HotTubBase;

                    switch (RandomUtil.GetWeightedIndex(container.BabyTraitChance))
                    {
                    case 1:
                        pregnancy.SetForcedBabyTrait(TraitNames.Hydrophobic);
                        break;

                    case 2:
                        pregnancy.SetForcedBabyTrait(TraitNames.PartyAnimal);
                        break;
                    }
                }
            }
        }
コード例 #8
0
        public override bool Run()
        {
            try
            {
                if (!StartSync())
                {
                    return(false);
                }

                bool flag2 = false;

                StandardEntry(false);
                BeginCommodityUpdates();

                bool succeeded = false;

                try
                {
                    if (IsMaster)
                    {
                        HotTubBase container = Actor.Posture.Container as HotTubBase;
                        container.mSimsAreWooHooing = true;
                        ReturnInstance.EnsureMaster();
                        mCurrentStateMachine = ReturnInstance.mCurrentStateMachine;

                        IWooHooDefinition definition = InteractionDefinition as IWooHooDefinition;;

                        string socialName = CommonWoohoo.GetSocialName(definition.GetStyle(this), Actor);
                        StartSocial(socialName);

                        Actor.SocialComponent.StartSocializingWith(Target);

                        Dictionary <Sim, SocialRule> effects = new Dictionary <Sim, SocialRule>();
                        SocialEffect = Actor.Conversation.UpdateOnSelectingInteraction(Actor, Target, Autonomous, CommonWoohoo.GetSocialName(definition.GetStyle(this), Actor), null, null, effects);
                        Rejected     = (SocialEffect == null) || (!SocialEffect.LHS.IsSocialAccepted());

                        InitiateSocialUI(Actor, Target);
                        (LinkedInteractionInstance as NestedCuddleInteraction).Rejected = Rejected;
                        if (Rejected)
                        {
                            mCurrentStateMachine.RequestState(null, "Woo Hoo Reject");
                            mCurrentStateMachine.RequestState(null, "ExitSitting");
                            FinishSocial(socialName, true);
                            FinishSocialContext();
                            Actor.BuffManager.AddElement(BuffNames.WalkOfShame, Origin.FromRejectedWooHooOffHome);
                        }
                        else
                        {
                            if (CommonWoohoo.NeedPrivacy(false, Actor, Target))
                            {
                                mSituation = new WooHoo.WooHooPrivacySituation(this);
                                flag2      = !mSituation.Start();
                            }

                            if (!flag2)
                            {
                                RockGemMetalBase.HandleNearbyWoohoo(Actor, RockGemMetalBase.HowMuchWooHoo.MoreWoohoo);
                                mCurrentStateMachine.AddOneShotScriptEventHandler(0x6e, OnAnimationEvent);
                                mCurrentStateMachine.AddOneShotScriptEventHandler(0x6f, OnAnimationEvent);
                                mCurrentStateMachine.AddOneShotScriptEventHandler(0x78, OnAnimationEvent);
                                mCurrentStateMachine.AddOneShotScriptEventHandler(0x79, OnAnimationEvent);
                                mCurrentStateMachine.AddOneShotScriptEventHandler(0x70, OnBabyCheck);

                                mCurrentStateMachine.RequestState(null, "Woo Hoo Accept");
                                PuddleManager.AddPuddle(Actor.Posture.Container.Position);
                                RockGemMetalBase.HandleNearbyWoohoo(Actor, RockGemMetalBase.HowMuchWooHoo.LessWoohoo);

                                CommonWoohoo.RunPostWoohoo(Actor, Target, container, definition.GetStyle(this), definition.GetLocation(container), true);
                            }

                            FinishSocial(socialName, true);
                        }
                    }
                    else
                    {
                        DoLoop(~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached));
                    }
                    FinishLinkedInteraction(IsMaster);
                    succeeded = !Rejected && !flag2;
                }
                finally
                {
                    EndCommodityUpdates(succeeded);
                    StandardExit(false, false);
                }

                if (Rejected)
                {
                    InvokeDoResumeOnCleanup = false;
                }
                else if (!mPrivacyFailed)
                {
                    Actor.SimDescription.SetFirstWooHoo();
                }

                WaitForSyncComplete();
                return(!Rejected);
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception e)
            {
                Common.Exception(Actor, Target, e);
                return(false);
            }
        }
コード例 #9
0
ファイル: HotTubBaseEx.cs プロジェクト: yakoder/NRaas
 public EnterSkinnyDippingHotTubAreaProxy(HotTubBase hotTub)
 {
     mHotTub = hotTub;
 }
コード例 #10
0
ファイル: HotTubBaseEx.cs プロジェクト: yakoder/NRaas
 public ChildEnterSkinnyDippingPoolAreaProxy(HotTubBase hotTub)
 {
     mHotTub = hotTub;
 }
コード例 #11
0
ファイル: HotTubBaseEx.cs プロジェクト: yakoder/NRaas
        public static bool SitDown(HotTubBase ths, Sim s, Slot slot, HotTubSeat seat, Sim.SwitchOutfitHelper switchOutfitHelper, bool isSkinnyDipping, Sim invitedBy, bool isAutonomous)
        {
            bool flag       = isSkinnyDipping;
            bool paramValue = true;

            if ((s.GetCurrentOutfitCategoryFromOutfitInGameObject() == OutfitCategories.Swimwear) && !isSkinnyDipping)
            {
                paramValue = false;
            }

            if ((s.OccultManager.DisallowClothesChange() || (s.GetCurrentOutfitCategoryFromOutfitInGameObject() == OutfitCategories.Singed)) || s.BuffManager.DisallowClothesChange())
            {
                paramValue = false;
            }

            if ((s.Service != null) && (s.Service.ServiceType == ServiceType.GrimReaper))
            {
                paramValue = false;
            }

            if (s.GetCurrentOutfitCategoryFromOutfitInGameObject() == OutfitCategories.Naked)
            {
                flag = false;
            }
            else
            {
                s.RefreshCurrentOutfit(false);
            }

            if (!paramValue)
            {
                flag = false;
            }

            ths.PartComponent.SetSimAtPart(s, slot);
            switchOutfitHelper.Wait(true);
            StateMachineClient smc = StateMachineClient.Acquire(s, "HotTub", AnimationPriority.kAPDefault);

            if (smc == null)
            {
                s.AddExitReason(ExitReason.NullValueFound);
                ths.PartComponent.SetSimAtPart(null, slot);
                switchOutfitHelper.Dispose();
                return(false);
            }

            smc.SetActor("x", s);
            smc.SetActor("hotTub", ths);
            smc.SetParameter("IkSuffix", seat.IKSuffix);
            smc.SetParameter("isMirrored", seat.IsMirrored);
            smc.SetParameter("doClothesSpin", paramValue);
            smc.SetParameter("playLookaround", isSkinnyDipping && ths.IsFirstSkinnyDipper());
            smc.AddOneShotScriptEventHandler(0x67, new SacsEventHandler(ths.TubEntered));
            smc.AddOneShotScriptEventHandler(0xc9, new SacsEventHandler(seat.SlotSimIntoHottub));
            smc.AddPersistentScriptEventHandler(0x69, new SacsEventHandler(seat.UnparentAndUpdateDrinkStatus));
            if (flag)
            {
                smc.AddOneShotScriptEventHandler(0x67, new SacsEventHandler(seat.CreateClothingPile));
            }

            smc.EnterState("x", "Enter");
            switchOutfitHelper.AddScriptEventHandler(smc);
            Glass actor = null;

            seat.DrinkRef = null;
            Glass.CarryingGlassPosture posture = s.Posture as Glass.CarryingGlassPosture;
            if (posture != null)
            {
                actor = posture.ObjectBeingCarried as Glass;
                CarrySystem.ExitCarry(s);
                actor.FadeOut(true);
                actor.UnParent();
                s.PopPosture();
                actor.ParentToSlot(ths, seat.DrinkSlot);
                actor.FadeIn();
                smc.SetActor("drink", actor);
                seat.DrinkRef = actor;
            }

            s.InteractionQueue.CancelAllInteractionsByType(Glass.Drink.Singleton);
            StereoCheap cheap = s.Inventory.Find <StereoCheap>();

            if (((cheap != null) && !ths.IsSlotOccupied(ths.BoomboxSlot)) && s.Inventory.TryToRemove(cheap))
            {
                cheap.SetOpacity(0f, 0f);
                if (cheap.ParentToSlot(ths, ths.BoomboxSlot))
                {
                    cheap.FadeIn(false);
                }
                else
                {
                    cheap.FadeIn(false, 0f);
                    s.Inventory.TryToAdd(cheap);
                }
            }

            smc.SetParameter("hasDrink", actor != null);
            smc.RequestState("x", "Sitting");
            HotTubPosture posture2 = new HotTubPosture(s, ths, smc, seat);

            posture2.InvitedBy          = invitedBy;
            posture2.AutonomouslyChosen = isAutonomous;
            s.Posture = posture2;
            if (!s.Posture.Satisfies(CommodityKind.InHotTub, ths))
            {
                s.AddExitReason(ExitReason.FailedToStart);
                ths.PartComponent.SetSimAtPart(null, slot);
                seat.DrinkRef = null;
                return(false);
            }

            EventTracker.SendEvent(new Event(EventTypeId.kGoHotTubbing, s, ths));
            if (isSkinnyDipping)
            {
                StartSkinnyDipBroadcastersAndSendWishEvents(ths, s);
            }
            return(true);
        }
コード例 #12
0
            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;
                }
            }
コード例 #13
0
ファイル: HotTubGetIn.cs プロジェクト: Robobeurre/NRaas
            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;
                }
            }
コード例 #14
0
 public override bool Test(Sim a, HotTubBase target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
 {
     return(target.Repairable.Broken);
 }
コード例 #15
0
ファイル: HotTubBaseEx.cs プロジェクト: Robobeurre/NRaas
 public ChildEnterSkinnyDippingPoolAreaProxy(HotTubBase hotTub)
 {
     mHotTub = hotTub;
 }
コード例 #16
0
ファイル: HotTubBaseEx.cs プロジェクト: Robobeurre/NRaas
        public static void StartSkinnyDipBroadcastersAndSendWishEvents(HotTubBase ths, Sim skinnyDipper)
        {
            foreach (ulong num in ths.GetSkinnyDippers())
            {
                SimDescription description = SimDescription.Find(num);
                if (description != null)
                {
                    Sim createdSim = description.CreatedSim;
                    EventTracker.SendEvent(EventTypeId.kGoSkinnyDipping, createdSim);
                }
            }

            EventTracker.SendEvent(EventTypeId.kGoSkinnyDipping, skinnyDipper);
            EventTracker.SendEvent(new Event(EventTypeId.kGoSkinnyDipping, skinnyDipper, ths));

            if (ths.mSkinnyDipBroadcaster != null)
            {
                try
                {
                    ths.mSkinnyDipBroadcaster.ExecuteOnEnterCallbackOnSimsInRadius(skinnyDipper);
                }
                catch (Exception e)
                {
                    ths.mSkinnyDipBroadcaster.Dispose();
                    ths.mSkinnyDipBroadcaster = null;

                    Common.DebugException(ths, skinnyDipper, e);
                }
            }

            if (ths.mSkinnyDipBroadcaster == null)
            {
                ths.mSkinnyDipBroadcaster = new ReactionBroadcaster(ths, Pool.kSkinnyDipReactionParams, new EnterSkinnyDippingHotTubAreaProxy(ths).Perform);
            }

            // Custom
            if ((!Woohooer.Settings.mAllowTeenSkinnyDip) && (Woohooer.Settings.mEnforceSkinnyDipPrivacy))
            {
                if ((ths.mChildEnteredBroadcaster == null) && ths.IsOutside)
                {
                    ths.mChildEnteredBroadcaster = new ReactionBroadcaster(ths, Pool.kChildEnterReactionParams, new ChildEnterSkinnyDippingPoolAreaProxy(ths).Perform);
                }

                ths.CheckIfChildOnLot();

                if (!ths.mHasAddedLotCheckForChild)
                {
                    ths.mHasAddedLotCheckForChild = true;
                    Sim.sOnLotChangedDelegates -= ths.OnChildLotChanged;
                    Sim.sOnLotChangedDelegates += ths.OnChildLotChanged;
                }
            }
            else
            {
                if ((ths.mChildEnteredBroadcaster == null) && ths.IsOutside)
                {
                    ths.mChildEnteredBroadcaster = new ReactionBroadcaster(ths, Pool.kChildEnterReactionParams, OnStub);
                }

                ths.mHasAddedLotCheckForChild = true;

                Sim.sOnLotChangedDelegates -= ths.OnChildLotChanged;
            }
        }
コード例 #17
0
ファイル: HotTubGetOut.cs プロジェクト: yakoder/NRaas
 public override string GetInteractionName(Sim actor, HotTubBase target, InteractionObjectPair iop)
 {
     return(base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target)));
 }
コード例 #18
0
ファイル: HotTubBaseEx.cs プロジェクト: Robobeurre/NRaas
        public static bool SitDown(HotTubBase ths, Sim s, Slot slot, HotTubSeat seat, Sim.SwitchOutfitHelper switchOutfitHelper, bool isSkinnyDipping, Sim invitedBy, bool isAutonomous)
        {
            bool flag = isSkinnyDipping;
            bool paramValue = true;
            if ((s.GetCurrentOutfitCategoryFromOutfitInGameObject() == OutfitCategories.Swimwear) && !isSkinnyDipping)
            {
                paramValue = false;
            }

            if ((s.OccultManager.DisallowClothesChange() || (s.GetCurrentOutfitCategoryFromOutfitInGameObject() == OutfitCategories.Singed)) || s.BuffManager.DisallowClothesChange())
            {
                paramValue = false;
            }

            if ((s.Service != null) && (s.Service.ServiceType == ServiceType.GrimReaper))
            {
                paramValue = false;
            }

            if (s.GetCurrentOutfitCategoryFromOutfitInGameObject() == OutfitCategories.Naked)
            {
                flag = false;
            }
            else
            {
                s.RefreshCurrentOutfit(false);
            }

            if (!paramValue)
            {
                flag = false;
            }

            ths.PartComponent.SetSimAtPart(s, slot);
            switchOutfitHelper.Wait(true);
            StateMachineClient smc = StateMachineClient.Acquire(s, "HotTub", AnimationPriority.kAPDefault);
            if (smc == null)
            {
                s.AddExitReason(ExitReason.NullValueFound);
                ths.PartComponent.SetSimAtPart(null, slot);
                switchOutfitHelper.Dispose();
                return false;
            }

            smc.SetActor("x", s);
            smc.SetActor("hotTub", ths);
            smc.SetParameter("IkSuffix", seat.IKSuffix);
            smc.SetParameter("isMirrored", seat.IsMirrored);
            smc.SetParameter("doClothesSpin", paramValue);
            smc.SetParameter("playLookaround", isSkinnyDipping && ths.IsFirstSkinnyDipper());
            smc.AddOneShotScriptEventHandler(0x67, new SacsEventHandler(ths.TubEntered));
            smc.AddOneShotScriptEventHandler(0xc9, new SacsEventHandler(seat.SlotSimIntoHottub));
            smc.AddPersistentScriptEventHandler(0x69, new SacsEventHandler(seat.UnparentAndUpdateDrinkStatus));
            if (flag)
            {
                smc.AddOneShotScriptEventHandler(0x67, new SacsEventHandler(seat.CreateClothingPile));
            }

            smc.EnterState("x", "Enter");
            switchOutfitHelper.AddScriptEventHandler(smc);
            Glass actor = null;
            seat.DrinkRef = null;
            Glass.CarryingGlassPosture posture = s.Posture as Glass.CarryingGlassPosture;
            if (posture != null)
            {
                actor = posture.ObjectBeingCarried as Glass;
                CarrySystem.ExitCarry(s);
                actor.FadeOut(true);
                actor.UnParent();
                s.PopPosture();
                actor.ParentToSlot(ths, seat.DrinkSlot);
                actor.FadeIn();
                smc.SetActor("drink", actor);
                seat.DrinkRef = actor;
            }

            s.InteractionQueue.CancelAllInteractionsByType(Glass.Drink.Singleton);
            StereoCheap cheap = s.Inventory.Find<StereoCheap>();
            if (((cheap != null) && !ths.IsSlotOccupied(ths.BoomboxSlot)) && s.Inventory.TryToRemove(cheap))
            {
                cheap.SetOpacity(0f, 0f);
                if (cheap.ParentToSlot(ths, ths.BoomboxSlot))
                {
                    cheap.FadeIn(false);
                }
                else
                {
                    cheap.FadeIn(false, 0f);
                    s.Inventory.TryToAdd(cheap);
                }
            }

            smc.SetParameter("hasDrink", actor != null);
            smc.RequestState("x", "Sitting");
            HotTubPosture posture2 = new HotTubPosture(s, ths, smc, seat);
            posture2.InvitedBy = invitedBy;
            posture2.AutonomouslyChosen = isAutonomous;
            s.Posture = posture2;
            if (!s.Posture.Satisfies(CommodityKind.InHotTub, ths))
            {
                s.AddExitReason(ExitReason.FailedToStart);
                ths.PartComponent.SetSimAtPart(null, slot);
                seat.DrinkRef = null;
                return false;
            }

            EventTracker.SendEvent(new Event(EventTypeId.kGoHotTubbing, s, ths));
            if (isSkinnyDipping)
            {
                StartSkinnyDipBroadcastersAndSendWishEvents(ths, s);
            }
            return true;
        }
コード例 #19
0
            public PushWooHooOrTryForBaby(HotTubBase obj, Sim actor, Sim target, bool autonomous, bool pushGetIn, InteractionDefinition definition)
            {
                mObject     = obj;
                mActor      = actor;
                mTarget     = target;
                mDefinition = definition;
                mAutonomous = autonomous;

                if (pushGetIn)
                {
                    InteractionDefinition getInDefinition = HotTubGetIn.Singleton;
                    if (Woohooer.Settings.mNakedOutfitHotTub)
                    {
                        InteractionInstanceParameters parameters = new InteractionInstanceParameters(new InteractionObjectPair(HotTubGetIn.SkinnyDipSingleton, mObject), actor, new InteractionPriority(InteractionPriorityLevel.UserDirected), false, true);

                        bool success = true;

                        GreyedOutTooltipCallback greyedOutTooltipCallback = null;
                        if (!IUtil.IsPass(HotTubGetIn.SkinnyDipSingleton.Test(ref parameters, ref greyedOutTooltipCallback)))
                        {
                            success = false;
                        }

                        if (success)
                        {
                            parameters = new InteractionInstanceParameters(new InteractionObjectPair(HotTubGetIn.SkinnyDipSingleton, mObject), target, new InteractionPriority(InteractionPriorityLevel.UserDirected), false, true);

                            if (!IUtil.IsPass(HotTubGetIn.SkinnyDipSingleton.Test(ref parameters, ref greyedOutTooltipCallback)))
                            {
                                success = false;
                            }
                        }

                        if (success)
                        {
                            getInDefinition = HotTubGetIn.SkinnyDipSingleton;
                        }
                    }

                    mActor.GreetSimOnMyLotIfPossible(mTarget);
                    HotTubGetIn entry = getInDefinition.CreateInstanceWithCallbacks(mObject, mActor, new InteractionPriority(InteractionPriorityLevel.UserDirected), false, true, null, OnActorCompleted, null) as HotTubGetIn;
                    entry.mIsMaster = true;
                    if (mActor.InteractionQueue.Add(entry))
                    {
                        InteractionInstance instance = getInDefinition.CreateInstanceWithCallbacks(mObject, mTarget, new InteractionPriority(InteractionPriorityLevel.UserDirected), false, true, null, OnCompleted, null);

                        if (mTarget.InteractionQueue.Add(instance))
                        {
                            instance.LinkedInteractionInstance = entry;
                        }
                        else
                        {
                            mTargetFail = true;
                        }
                    }
                }
                else
                {
                    OnCompleted(mActor, 1);
                }
            }
コード例 #20
0
ファイル: HotTubBaseEx.cs プロジェクト: Robobeurre/NRaas
 public EnterSkinnyDippingHotTubAreaProxy(HotTubBase hotTub)
 {
     mHotTub = hotTub;
 }
コード例 #21
0
 public override string GetInteractionName(Sim actor, HotTubBase 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) }));
 }
コード例 #22
0
ファイル: HotTubGetIn.cs プロジェクト: Robobeurre/NRaas
 public override string GetInteractionName(Sim actor, HotTubBase target, InteractionObjectPair iop)
 {
     if (IsSkinnyDipping)
     {
         return Localization.LocalizeString(HotTubBase.sLocalizationKey + "/GetIn:SkinnyDipInteractionName", new object[0x0]);
     }
     else
     {
         return base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target));
     }
 }
コード例 #23
0
 public override string GetInteractionName(Sim actor, HotTubBase target, InteractionObjectPair iop)
 {
     return(Common.LocalizeEAString(actor.IsFemale, "Gameplay/Excel/Socializing/Action:NRaasTryForBaby", new object[0]));
 }
コード例 #24
0
ファイル: HotTubGetOut.cs プロジェクト: Robobeurre/NRaas
 public override string GetInteractionName(Sim actor, HotTubBase target, InteractionObjectPair iop)
 {
     return base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target));
 }
コード例 #25
0
ファイル: HotTubBaseEx.cs プロジェクト: yakoder/NRaas
        public static void StartSkinnyDipBroadcastersAndSendWishEvents(HotTubBase ths, Sim skinnyDipper)
        {
            foreach (ulong num in ths.GetSkinnyDippers())
            {
                SimDescription description = SimDescription.Find(num);
                if (description != null)
                {
                    Sim createdSim = description.CreatedSim;
                    EventTracker.SendEvent(EventTypeId.kGoSkinnyDipping, createdSim);
                }
            }

            EventTracker.SendEvent(EventTypeId.kGoSkinnyDipping, skinnyDipper);
            EventTracker.SendEvent(new Event(EventTypeId.kGoSkinnyDipping, skinnyDipper, ths));

            if (ths.mSkinnyDipBroadcaster != null)
            {
                try
                {
                    ths.mSkinnyDipBroadcaster.ExecuteOnEnterCallbackOnSimsInRadius(skinnyDipper);
                }
                catch (Exception e)
                {
                    ths.mSkinnyDipBroadcaster.Dispose();
                    ths.mSkinnyDipBroadcaster = null;

                    Common.DebugException(ths, skinnyDipper, e);
                }
            }

            if (ths.mSkinnyDipBroadcaster == null)
            {
                ths.mSkinnyDipBroadcaster = new ReactionBroadcaster(ths, Pool.kSkinnyDipReactionParams, new EnterSkinnyDippingHotTubAreaProxy(ths).Perform);
            }

            // Custom
            if ((!Woohooer.Settings.mAllowTeenSkinnyDip) && (Woohooer.Settings.mEnforceSkinnyDipPrivacy))
            {
                if ((ths.mChildEnteredBroadcaster == null) && ths.IsOutside)
                {
                    ths.mChildEnteredBroadcaster = new ReactionBroadcaster(ths, Pool.kChildEnterReactionParams, new ChildEnterSkinnyDippingPoolAreaProxy(ths).Perform);
                }

                ths.CheckIfChildOnLot();

                if (!ths.mHasAddedLotCheckForChild)
                {
                    ths.mHasAddedLotCheckForChild = true;
                    Sim.sOnLotChangedDelegates   -= ths.OnChildLotChanged;
                    Sim.sOnLotChangedDelegates   += ths.OnChildLotChanged;
                }
            }
            else
            {
                if ((ths.mChildEnteredBroadcaster == null) && ths.IsOutside)
                {
                    ths.mChildEnteredBroadcaster = new ReactionBroadcaster(ths, Pool.kChildEnterReactionParams, OnStub);
                }

                ths.mHasAddedLotCheckForChild = true;

                Sim.sOnLotChangedDelegates -= ths.OnChildLotChanged;
            }
        }