private new void StartJealousyBroadcaster() { try { if (mReactToSocialBroadcaster == null) { mReactToSocialBroadcaster = new ReactionBroadcaster(Actor, Conversation.ReactToSocialParams, SocialComponentEx.ReactToJealousEventHigh); CommonWoohoo.CheckForWitnessedCheating(Actor, Actor.SynchronizationTarget, true); } if (mIsMaster) { ElevatorWooHoo linked = LinkedInteractionInstance as ElevatorWooHoo; if (linked != null) { linked.StartJealousyBroadcaster(); } } } catch (Exception e) { Common.Exception(Actor, Target, e); } }
private new void StartJealousyBroadcaster() { try { if (mReactToSocialBroadcaster == null) { mReactToSocialBroadcaster = new ReactionBroadcaster(Actor, sBroadcastParams, SocialComponentEx.ReactToJealousEventHigh); CommonWoohoo.CheckForWitnessedCheating(Actor, Target, !Rejected); } if (IsMaster) { BedSurrogate linked = LinkedInteractionInstance as BedSurrogate; if (linked != null) { linked.StartJealousyBroadcaster(); } } } catch (Exception e) { Common.Exception(Actor, Target, e); } }
private void OnJealousyEvent(StateMachineClient smc, IEvent evt) { if (mReactToSocialBroadcasterActor == null) { mReactToSocialBroadcasterActor = new ReactionBroadcaster(Actor, Conversation.ReactToSocialParams, SocialComponentEx.ReactToJealousEventHigh); CommonWoohoo.CheckForWitnessedCheating(Actor, Target, !Rejected); } if (mReactToSocialBroadcasterTarget == null) { mReactToSocialBroadcasterTarget = new ReactionBroadcaster(Target, Conversation.ReactToSocialParams, SocialComponentEx.ReactToJealousEventHigh); CommonWoohoo.CheckForWitnessedCheating(Target, Actor, !Rejected); } }
public override bool Run() { Common.StringBuilder msg = new Common.StringBuilder("WooHooInRabbitHoleWithEx:Run"); try { msg += "A"; BaseDefinition interactionDefinition = InteractionDefinition as BaseDefinition; Sim selectedObject = interactionDefinition.GetTarget(Actor, Target, this); if (selectedObject == null) { return(false); } msg += "B"; bool impregnate = true; VisitRabbitHoleEx currentInteraction = selectedObject.CurrentInteraction as VisitRabbitHoleEx; if (currentInteraction != null) { msg += "C"; currentInteraction.IsGettingItOn = true; currentInteraction.WooHooer = Actor; currentInteraction.WooHooee = selectedObject; if (interactionDefinition.GetStyle(this) == CommonWoohoo.WoohooStyle.TryForBaby) { currentInteraction.RomanticType = RabbitHoleRomanticType.TryForBaby; } else { currentInteraction.RomanticType = RabbitHoleRomanticType.WooHoo; } currentInteraction.mImpregnate = impregnate; currentInteraction.mStyle = interactionDefinition.GetStyle(this); currentInteraction.ActiveStage = currentInteraction.GetStages()[0x1]; impregnate = false; } currentInteraction = Actor.CurrentInteraction as VisitRabbitHoleEx; if (currentInteraction != null) { msg += "D"; currentInteraction.IsGettingItOn = true; currentInteraction.WooHooer = Actor; currentInteraction.WooHooee = selectedObject; if (interactionDefinition.Makeout) { currentInteraction.RomanticType = RabbitHoleRomanticType.MakeOut; } else if (interactionDefinition.GetStyle(this) == CommonWoohoo.WoohooStyle.TryForBaby) { currentInteraction.RomanticType = RabbitHoleRomanticType.TryForBaby; } else { currentInteraction.RomanticType = RabbitHoleRomanticType.WooHoo; } currentInteraction.mImpregnate = impregnate; currentInteraction.mStyle = interactionDefinition.GetStyle(this); currentInteraction.ActiveStage = currentInteraction.GetStages()[0x1]; } msg += "E"; Target.RabbitHoleProxy.TurnOnWooHooEffect(); CommonWoohoo.CheckForWitnessedCheating(Actor, selectedObject, true); if (interactionDefinition.Makeout) { EventTracker.SendEvent(new WooHooEvent(EventTypeId.kMadeOut, Actor, selectedObject, Target)); EventTracker.SendEvent(new WooHooEvent(EventTypeId.kMadeOut, selectedObject, Actor, Target)); EventTracker.SendEvent(new SocialEvent(EventTypeId.kSocialInteraction, Actor, selectedObject, "Make Out", false, true, false, CommodityTypes.Undefined)); EventTracker.SendEvent(new SocialEvent(EventTypeId.kSocialInteraction, selectedObject, Actor, "Make Out", true, true, false, CommodityTypes.Undefined)); } return(true); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, msg, e); return(false); } finally { Common.DebugNotify(msg); } }
public override bool Run() { try { int num; if ((WoohooObject == null) || !WoohooObject.CanWooHooIn()) { return(false); } if (!SafeToSync()) { return(false); } LeafPile.WoohooInPileOrStackB entry = LeafPile.WoohooInPileOrStackB.Singleton.CreateInstance(Actor, Target, GetPriority(), Autonomous, CancellableByPlayer) as LeafPile.WoohooInPileOrStackB; entry.LinkedInteractionInstance = this; if (!Target.InteractionQueue.Add(entry)) { Common.DebugNotify("LeafPileBaseWoohoo Add Fail"); return(false); } Actor.SynchronizationLevel = Sim.SyncLevel.Started; Actor.SynchronizationTarget = Target; Actor.SynchronizationRole = Sim.SyncRole.Initiator; if (!WoohooObject.SimLine.WaitForTurn(this, SimQueue.WaitBehavior.Default, ~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached), 10f)) { return(false); } Slot[] routingSlots = WoohooObject.GetRoutingSlots(); if (!Actor.RouteToSlotListAndCheckInUse(WoohooObject, routingSlots, out num)) { return(false); } if (!WoohooObject.CanWooHooIn()) { return(false); } CommonWoohoo.TestNakedOutfit(UsingNakedOutfit, Actor, Target); mActorXRoutingSlot = routingSlots[num]; StandardEntry(); WoohooObject.AddToUseList(Actor); WoohooObject.AddToUseList(Target); BeginCommodityUpdates(); EnterStateMachine(WoohooObject.JazzFileName, "Enter", "x"); AddOneShotScriptEventHandler(0x65, PlayEffectsHandlerX); AddOneShotScriptEventHandler(0x78, AnimCallbackSimX); SetActor(WoohooObject.JazzObjectName, WoohooObject); Animate("x", "GetInStackX"); WoohooObject.SimLine.RemoveFromQueue(Actor); if (!Actor.WaitForSynchronizationLevelWithSim(Target, Sim.SyncLevel.Routed, 30f)) { AddOneShotScriptEventHandler(0x65, PlayEffectsHandlerX); AddOneShotScriptEventHandler(0x66, PlayEffectsHandlerX); AddOneShotScriptEventHandler(0x6e, AnimCallbackSimX); AddOneShotScriptEventHandler(0x79, AnimCallbackSimX); Animate("x", "GetOut"); Animate("x", "Exit"); WoohooObject.RemoveFromUseList(Actor); WoohooObject.RemoveFromUseList(Target); EndCommodityUpdates(false); StandardExit(); return(false); } mActorYRoutingSlot = (Slot)(LinkedInteractionInstance as LeafPile.WoohooInPileOrStackB).RoutedSlot; RockGemMetalBase.HandleNearbyWoohoo(Actor, RockGemMetalBase.HowMuchWooHoo.MoreWoohoo); SetActor("y", Target); EnterState("y", "Enter"); AddOneShotScriptEventHandler(0x65, PlayEffectsHandlerY); AddOneShotScriptEventHandler(0x78, AnimCallbackSimY); Animate("y", "GetInStackY"); if (mReactToSocialBroadcasterActor == null) { mReactToSocialBroadcasterActor = new ReactionBroadcaster(Actor, Conversation.ReactToSocialParams, SocialComponentEx.ReactToJealousEventHigh); CommonWoohoo.CheckForWitnessedCheating(Actor, Target, true); } if (mReactToSocialBroadcasterTarget == null) { mReactToSocialBroadcasterTarget = new ReactionBroadcaster(Target, Conversation.ReactToSocialParams, SocialComponentEx.ReactToJealousEventHigh); CommonWoohoo.CheckForWitnessedCheating(Target, Actor, true); } AnimateJoinSims("Woohoo"); (WoohooObject as GameObject).PushSimsFromFootprint((uint)mActorXRoutingSlot, Actor, null, true); AddOneShotScriptEventHandler(0x65, PlayEffectsHandlerX); AddOneShotScriptEventHandler(0x66, PlayEffectsHandlerX); AddOneShotScriptEventHandler(0x6e, AnimCallbackSimX); AddOneShotScriptEventHandler(0x79, AnimCallbackSimX); AnimateJoinSims("GetOutX"); List <Sim> exceptions = new List <Sim>(); exceptions.Add(Actor); (WoohooObject as GameObject).PushSimsFromFootprint((uint)mActorYRoutingSlot, Target, exceptions, true); if (mActorYRoutingSlot == mActorXRoutingSlot) { Actor.Wander(1f, 2f, false, RouteDistancePreference.PreferFurthestFromRouteOrigin, true); } AddOneShotScriptEventHandler(0x65, PlayEffectsHandlerY); AddOneShotScriptEventHandler(0x66, PlayEffectsHandlerY); AddOneShotScriptEventHandler(0x6e, AnimCallbackSimY); AddOneShotScriptEventHandler(0x79, AnimCallbackSimY); AnimateJoinSims("GetOutY"); AnimateJoinSims("Exit"); RockGemMetalBase.HandleNearbyWoohoo(Actor, RockGemMetalBase.HowMuchWooHoo.LessWoohoo); IWooHooDefinition definition = InteractionDefinition as IWooHooDefinition; CommonWoohoo.RunPostWoohoo(Actor, Target, WoohooObject, definition.GetStyle(this), definition.GetLocation(WoohooObject), true); if (CommonPregnancy.IsSuccess(Actor, Target, Autonomous, definition.GetStyle(this))) { Pregnancy pregnancy = CommonPregnancy.Impregnate(Actor, Target, Autonomous, definition.GetStyle(this)); if (pregnancy != null) { if (RandomUtil.RandomChance(WoohooObject.ChanceBabyGetsLovesOutdoorsTrait)) { pregnancy.SetForcedBabyTrait(TraitNames.LovesTheOutdoors); } } } WoohooObject.RemoveFromUseList(Actor); WoohooObject.RemoveFromUseList(Target); EndCommodityUpdates(true); StandardExit(); VisitSituation situation = VisitSituation.FindVisitSituationInvolvingGuest(Actor); VisitSituation situation2 = VisitSituation.FindVisitSituationInvolvingGuest(Target); if ((situation != null) && (situation2 != null)) { situation.GuestStartingInappropriateAction(Actor, 3.5f); situation2.GuestStartingInappropriateAction(Target, 3.5f); } if (RandomUtil.RandomChance(WoohooObject.ChanceGetRollInHayBuff)) { Actor.BuffManager.AddElement(BuffNames.RolledInTheHay, Origin.FromWooHooInHayStack); Target.BuffManager.AddElement(BuffNames.RolledInTheHay, Origin.FromWooHooInHayStack); } Relationship.Get(Actor, Target, true).LTR.UpdateLiking(WoohooObject.LTRGain); EventTracker.SendEvent(WoohooObject.WooHooEventID, Actor, Target); EventTracker.SendEvent(WoohooObject.WooHooEventID, Target, Actor); return(true); } catch (ResetException) { throw; } catch (Exception exception) { Common.Exception(Actor, Target, exception); return(false); } }
public override bool Run() { try { SetPriority(new InteractionPriority(InteractionPriorityLevel.Zero)); Cancelled = false; if (!StartSync(IsMaster, true)) { return(false); } // Custom mReactToSocialBroadcaster = new ReactionBroadcaster(Actor, Conversation.ReactToSocialParams, SocialComponentEx.ReactToJealousEventMedium); CommonWoohoo.CheckForWitnessedCheating(Actor, Target, !Rejected); if (IsMaster) { //StartSocialContext(); Actor.SocialComponent.StartSocializingWith(Target); InitiateSocialUI(Actor, Target); if (mCurrentStateMachine == null) { BedMultiPart container = Actor.Posture.Container as BedMultiPart; EnterStateMachine("BedSocials", "FromRelax", "x", "y"); SetActor("bed", container); SetActorsAndParameters(); mCurrentStateMachine.EnterState("y", "FromRelax"); mCurrentStateMachine.RequestState(false, "x", "Cuddle"); mCurrentStateMachine.RequestState(true, "y", "Cuddle"); FinishSocial("Cuddle", true); } else { mCurrentStateMachine.RequestState(null, "Cuddle"); } } StandardEntry(false); EnsureLinkedInteraction(); BeginCommodityUpdates(); Actor.BuffManager.RemoveElement(BuffNames.Lonely); bool succeeded = DoLoop(); bool flag2 = true; if (Actor.HasExitReason(ExitReason.HigherPriorityNext)) { CopyExitReasonToLinkedInteraction(); flag2 = OnHigherPriorityNext(); } if (flag2) { ForceExitNested = true; } if (IsMaster && flag2) { mCurrentStateMachine.RequestState(null, "ToRelax"); } FinishLinkedInteraction(IsMaster); EndCommodityUpdates(succeeded); StandardExit(false, false); WaitForSyncComplete(); return(succeeded); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); return(false); } }
public override bool Run() { try { mLinkedActor = LinkedInteractionInstance.InstanceActor; IWooHooDefinition definition = InteractionDefinition as IWooHooDefinition; bool succeeded = true; if (mIsMaster) { Target.mRoutingSims.Add(Actor); Target.mRoutingSims.Add(mLinkedActor); } if (!mIsMaster) { bool success = false; Actor.RouteToObjectRadialRange(Target, 1.5f, 4f); while (Target.mRoutingSims.Contains(mLinkedActor)) { AncientPortalWooHoo interaction = LinkedInteractionInstance as AncientPortalWooHoo; if (interaction == null) { break; } if (mLinkedActor.HasExitReason(ExitReason.Canceled)) { break; } if (interaction.mNowWaiting) { success = true; break; } SpeedTrap.Sleep(0xa); } if (!success) { Actor.AddExitReason(ExitReason.RouteFailed); return(false); } } bool routeSuccess = false; Route r = Actor.CreateRoute(); r.AddObjectToIgnoreForRoute(mLinkedActor.ObjectId); r.PlanToSlot(Target, Target.GetRoutingSlots()); routeSuccess = Actor.DoRoute(r); if ((mIsMaster) && (routeSuccess)) { routeSuccess = !Actor.InUse; } if (!routeSuccess) { Actor.AddExitReason(ExitReason.RouteFailed); return(false); } CommonWoohoo.TestNakedOutfit(Woohooer.Settings.mNakedOutfitAncientPortal, Actor); StandardEntry(); EnterStateMachine("AncientPortal", "Enter", "x", "portal"); AddOneShotScriptEventHandler(0x65, HideSim); AddOneShotScriptEventHandler(0x66, ShowSim); AnimateSim("InsidePortal"); if (mIsMaster) { Target.RemoveFromUseList(Actor); mNowWaiting = true; RockGemMetalBase.HandleNearbyWoohoo(Actor, RockGemMetalBase.HowMuchWooHoo.MoreWoohoo); } BeginCommodityUpdates(); if (mReactToSocialBroadcaster == null) { mReactToSocialBroadcaster = new ReactionBroadcaster(Actor, Conversation.ReactToSocialParams, SocialComponentEx.ReactToJealousEventHigh); CommonWoohoo.CheckForWitnessedCheating(Actor, mLinkedActor, !Rejected); } if ((Target.BoobyTrapComponent != null) ? Target.BoobyTrapComponent.CanTriggerTrap(Actor.SimDescription) : false) { Target.TriggerTrap(Actor); } int count = 0; while (Target.mRoutingSims.Contains(mLinkedActor)) { AncientPortalWooHoo interaction = LinkedInteractionInstance as AncientPortalWooHoo; if (interaction == null) { break; } if (mLinkedActor.HasExitReason(ExitReason.Canceled)) { break; } if (!mIsMaster) { interaction.mWasSuccess = true; if (count > 30) { break; } count++; Target.SetOpacity(RandomUtil.GetFloat(0f, 1f), 0.25f); } SpeedTrap.Sleep(10); } if (!mIsMaster) { Target.SetOpacity(1f, 1f); } AnimateSim("Exit"); for (int i = 0; i < AncientPortal.CatchABeam.kPotentialTravelBuffs.Length; i++) { if (RandomUtil.RandomChance(AncientPortal.CatchABeam.kChanceForEachBuff)) { Actor.BuffManager.AddElement(AncientPortal.CatchABeam.kPotentialTravelBuffs[i], Origin.FromAncientPortal); } } if (mIsMaster) { RockGemMetalBase.HandleNearbyWoohoo(Actor, RockGemMetalBase.HowMuchWooHoo.LessWoohoo); } EndCommodityUpdates(succeeded); StandardExit(); if ((mWasSuccess) && (mIsMaster)) { CommonWoohoo.RunPostWoohoo(Actor, mLinkedActor, Target, definition.GetStyle(this), definition.GetLocation(Target), true); if (CommonPregnancy.IsSuccess(Actor, mLinkedActor, Autonomous, definition.GetStyle(this))) { CommonPregnancy.Impregnate(Actor, mLinkedActor, Autonomous, definition.GetStyle(this)); } } Actor.Wander(1f, 2f, false, RouteDistancePreference.PreferNearestToRouteOrigin, false); return(succeeded); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); return(false); } finally { Target.mRoutingSims.Remove(Actor); } }
private static void RunPostWhoohooInternal(Sim actor, Sim target, IGameObject obj, bool fireDisgraceEvents) { SimDescription actorSim = actor.SimDescription; if (!actorSim.HadFirstWooHoo) { actorSim.SetFirstWooHoo(); EventTracker.SendEvent(EventTypeId.kHadFirstWoohoo, actor, target); } Woohooer.Settings.mLastWoohoo[actorSim.SimDescriptionId] = SimClock.CurrentTime(); SimDescription targetSim = target.SimDescription; if (!targetSim.HadFirstWooHoo) { targetSim.SetFirstWooHoo(); EventTracker.SendEvent(EventTypeId.kHadFirstWoohoo, target, actor); } Woohooer.Settings.mLastWoohoo[targetSim.SimDescriptionId] = SimClock.CurrentTime(); Relationship relationship = Relationship.Get(actor, target, true); if (relationship != null) { relationship.LTR.AddInteractionBit(LongTermRelationship.InteractionBits.Kissed); relationship.LTR.AddInteractionBit(LongTermRelationship.InteractionBits.WooHoo); } if ((obj != null) && (obj.LotCurrent.LotType == LotType.Commercial)) { actor.BuffManager.AddElement(BuffNames.PublicWooHoo, Origin.FromWooHooInPublic); target.BuffManager.AddElement(BuffNames.PublicWooHoo, Origin.FromWooHooInPublic); } if (actor.IsHuman) { if (fireDisgraceEvents) { CommonWoohoo.CheckForWitnessedCheating(actor, target, true); } actor.SimDescription.SetFirstKiss(target.SimDescription); target.SimDescription.SetFirstKiss(actor.SimDescription); if (fireDisgraceEvents) { CommonWoohoo.WoohooDisgraceChecks(actor, target); } if ((actor.Household != target.Household) && !Relationship.AreFianceeOrSpouse(actor, target)) { if (Woohooer.Settings.mAllowStrideOfPride) { actor.BuffManager.AddElement(BuffNames.StrideOfPride, Origin.FromWooHooOffHome); target.BuffManager.AddElement(BuffNames.StrideOfPride, Origin.FromWooHooOffHome); } } SocialCallback.AddIncredibleTimeBuffIfNecessary(actor, target); SocialCallback.AddIncredibleTimeBuffIfNecessary(target, actor); } else { EventTracker.SendEvent(EventTypeId.kPetWooHooed, actor, target); EventTracker.SendEvent(EventTypeId.kPetWooHooed, target, actor); if (((actor.Partner == null) && (target.Partner == null)) || (Woohooer.Settings.mForcePetMate[PersistedSettings.GetSpeciesIndex(actor)])) { Relationship.RemoveAllPetMateFlags(actor); Relationship.RemoveAllPetMateFlags(target); Relationship.Get(actor, target, false).LTR.AddInteractionBit(LongTermRelationship.InteractionBits.Marry); } } }
public override bool Run() { Common.StringBuilder msg = new Common.StringBuilder(GetType().FullName + ":Run"); try { msg += "A"; IWooHooDefinition interactionDefinition = InteractionDefinition as IWooHooDefinition; Sim selectedObject = GetSelectedObject() as Sim; //interactionDefinition.GetTarget(Actor, Target, this); if (selectedObject == null) { return(false); } msg += "B"; bool impregnate = true; RabbitHoleRomanticType romanticType = RabbitHoleRomanticType.WooHoo; if (interactionDefinition.GetStyle(this) == CommonWoohoo.WoohooStyle.TryForBaby) { romanticType = RabbitHoleRomanticType.TryForBaby; } CommonWoohoo.WoohooStyle style = interactionDefinition.GetStyle(this); TVisitInteraction currentInteraction = selectedObject.CurrentInteraction as TVisitInteraction; if (currentInteraction != null) { msg += "C"; ConfigureWooHooInteraction(currentInteraction, selectedObject, romanticType, impregnate, style); /*currentInteraction.IsGettingItOn = true; * currentInteraction.WooHooer = Actor; * currentInteraction.WooHooee = selectedObject; * * if (interactionDefinition.GetStyle(this) == CommonWoohoo.WoohooStyle.TryForBaby) * { * currentInteraction.RomanticType = RabbitHoleRomanticType.TryForBaby; * } * else * { * currentInteraction.RomanticType = RabbitHoleRomanticType.WooHoo; * } * * currentInteraction.mImpregnate = impregnate; * currentInteraction.mStyle = interactionDefinition.GetStyle(this); * currentInteraction.ActiveStage = currentInteraction.GetStages()[0x1];*/ impregnate = false; } currentInteraction = Actor.CurrentInteraction as TVisitInteraction; if (currentInteraction != null) { msg += "D"; if (Makeout) { romanticType = RabbitHoleRomanticType.MakeOut; } ConfigureWooHooInteraction(currentInteraction, selectedObject, romanticType, impregnate, style); /*currentInteraction.IsGettingItOn = true; * currentInteraction.WooHooer = Actor; * currentInteraction.WooHooee = selectedObject; * * if (interactionDefinition.Makeout) * { * currentInteraction.RomanticType = RabbitHoleRomanticType.MakeOut; * } * else if (interactionDefinition.GetStyle(this) == CommonWoohoo.WoohooStyle.TryForBaby) * { * currentInteraction.RomanticType = RabbitHoleRomanticType.TryForBaby; * } * else * { * currentInteraction.RomanticType = RabbitHoleRomanticType.WooHoo; * } * currentInteraction.mImpregnate = impregnate; * currentInteraction.mStyle = interactionDefinition.GetStyle(this); * currentInteraction.ActiveStage = currentInteraction.GetStages()[0x1];*/ } msg += "E"; Target.RabbitHoleProxy.TurnOnWooHooEffect(); CommonWoohoo.CheckForWitnessedCheating(Actor, selectedObject, true); if (Makeout) { EventTracker.SendEvent(new WooHooEvent(EventTypeId.kMadeOut, Actor, selectedObject, Target)); EventTracker.SendEvent(new WooHooEvent(EventTypeId.kMadeOut, selectedObject, Actor, Target)); EventTracker.SendEvent(new SocialEvent(EventTypeId.kSocialInteraction, Actor, selectedObject, "Make Out", false, true, false, CommodityTypes.Undefined)); EventTracker.SendEvent(new SocialEvent(EventTypeId.kSocialInteraction, selectedObject, Actor, "Make Out", true, true, false, CommodityTypes.Undefined)); } return(true); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, msg, e); return(false); } finally { Common.DebugNotify(msg); } }