Beispiel #1
0
            public override bool JoinInProgress(Sim actor, Sim target, IShowerable obj, InteractionInstance interaction)
            {
                if (obj.SimInShower == null)
                {
                    return(false);
                }

                ShowerWoohoo hoo = new ProxyDefinition(this).CreateInstance(obj.SimInShower, actor, interaction.GetPriority(), interaction.Autonomous, interaction.CancellableByPlayer) as ShowerWoohoo;

                if (actor.InteractionQueue.Add(hoo))
                {
                    Shower.TakeShower currentInteraction = obj.SimInShower.InteractionQueue.GetCurrentInteraction() as Shower.TakeShower;
                    if (currentInteraction != null)
                    {
                        currentInteraction.HavingWooHoo = true;
                        hoo.TakeShowerInst = currentInteraction;
                        hoo.Shower         = obj;
                    }
                }
                return(true);
            }
Beispiel #2
0
            public override void PushWooHoo(Sim actor, Sim target, IGameObject obj)
            {
                IShowerable shower = obj as IShowerable;

                InteractionPriority priority = new InteractionPriority(InteractionPriorityLevel.UserDirected);

                // Use custom interaction to bypass privacy
                Shower.TakeShower.Definition takeShower = null;
                foreach (InteractionObjectPair pair in shower.Interactions)
                {
                    takeShower = pair.InteractionDefinition as Shower.TakeShower.Definition;
                    if (takeShower != null)
                    {
                        break;
                    }
                }

                if (takeShower == null)
                {
                    Common.DebugNotify("PushWooHoo Take Shower Fail");
                    return;
                }

                Shower.TakeShower instance = takeShower.CreateInstance(shower, target, priority, false, true) as Shower.TakeShower;
                instance.HavingWooHoo = true;

                ShowerWoohoo hoo = new ProxyDefinition(this).CreateInstance(target, actor, priority, false, true) as ShowerWoohoo;

                hoo.WaitForBToEnterShower = true;
                hoo.Shower         = shower;
                hoo.TakeShowerInst = instance;
                if (actor.InteractionQueue.PushAsContinuation(hoo, true))
                {
                    target.InteractionQueue.PushAsContinuation(instance, true);
                    hoo.LinkedInteractionInstance = instance;
                }
            }