Esempio n. 1
0
            public ProxyDefinition(IWooHooProxyDefinition definition, Sim actor, IGameObject obj)
                : base(CommonWoohoo.GetSocialName(definition.GetStyle(null), actor), new string[0x0], null, false)
            {
                mDefinition = definition;

                mObject = obj;

                ChecksToSkip |= ActionData.ChecksToSkip.ProceduralTests;
            }
            public ProxyDefinition(IWooHooProxyDefinition definition, Sim actor, IGameObject obj)
                : base(CommonWoohoo.GetSocialName(definition.GetStyle(null), actor), new string[0x0], null, false)
            {
                mDefinition = definition;

                mObject = obj;

                ChecksToSkip |= ActionData.ChecksToSkip.ProceduralTests;
            }
Esempio n. 3
0
        public override bool Run()
        {
            try
            {
                IWooHooProxyDefinition definition = InteractionDefinition as IWooHooProxyDefinition;

                // Initiate from standing social
                Sim selectedTarget = definition.ITarget(this);

                // Join in progress
                if (definition.IJoinInProgress(Actor, selectedTarget, Target, this))
                {
                    return(true);
                }

                if (selectedTarget == null)
                {
                    return(false);
                }

                bool allowSocial = (definition.PushSocial) && (NRaas.Woohooer.Settings.mAllowForeplay);
                if (allowSocial)
                {
                    if ((Actor.SimDescription.IsZombie) || (selectedTarget.SimDescription.IsZombie))
                    {
                        allowSocial = false;
                    }
                    else if ((Actor.SimDescription.IsRobot) || (selectedTarget.SimDescription.IsRobot))
                    {
                        allowSocial = false;
                    }
                }

                if (allowSocial)
                {
                    InteractionInstance entry = new WooHooSocialInteraction.ProxyDefinition(definition, Actor, Target).CreateInstance(selectedTarget, Actor, GetPriority(), Autonomous, CancellableByPlayer);

                    return(Actor.InteractionQueue.Add(entry));
                }
                else
                {
                    definition.PushWooHoo(Actor, selectedTarget, Target);
                    return(true);
                }
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception exception)
            {
                Common.Exception(Actor, Target, exception);
                return(false);
            }
        }