Esempio n. 1
0
        public bool DoDispose(Sim Actor, Plant Target, InteractionInstance interaction)
        {
            IDisposePlantInteraction disposePlantInteraction = interaction as IDisposePlantInteraction;

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

            EWHerbLoreSkill skill = EWHerbLoreSkill.StartSkillGain(Actor);

            if (skill != null)
            {
                disposePlantInteraction.ReachedPlantDeletePointOfNoReturn();
                interaction.StandardEntry();
                interaction.BeginCommodityUpdates();

                // TODO: Hope to use dig animation here. Need to be converted?
                AcquireStateMachine("eatharvestablepet");
                mCurrentStateMachine.SetActor("x", Actor);
                mCurrentStateMachine.EnterState("x", "Enter");
                SetParameter("IsEatingOnGround", paramValue: true);

                uint footprintHash = Target.GetFootprintHash();
                Target.DisableFootprint(footprintHash);
                Target.GetSoil().DisableFootprint(1478897068u);

                AnimateSim("EatHarvestable");
                AnimateSim("Exit");
                interaction.EndCommodityUpdates(true);
                interaction.StandardExit();
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
 public virtual bool RouteAndAnimate(InteractionInstance interaction, Sim Actor)
 {
     if (!base.Actor.RouteToPointRadialRange(base.Target.Position, 0.5f, 2f))
     {
         return(false);
     }
     interaction.StandardEntry();
     if (Actor.SimDescription.ChildOrAbove)
     {
         //Think about styling
         ThoughtBalloonManager.BalloonData balloonData = ThoughtBalloonManager.GetBalloonData("Makeover", base.Actor);
         balloonData.BalloonType = ThoughtBalloonTypes.kSpeechBalloon;
         base.Actor.ThoughtBalloonManager.ShowBalloon(balloonData);
     }
     return(true);
 }
Esempio n. 3
0
        public static bool PreTrias(InteractionInstance ths)
        {
            //Sim actor = ths.InstanceActor as Sim;

            ths.StandardEntry();
            ths.BeginCommodityUpdates();

            /*
             * BuffTransformation transformBuff = actor.BuffManager.TransformBuff;
             * if (transformBuff != null)
             * {
             *  actor.BuffManager.RemoveElement(transformBuff.Guid);
             * }
             */

            return(true);
        }
Esempio n. 4
0
        public static bool PreTimeTravel2(InteractionInstance ths, List <Sim> travelers)
        {
            Sim actor = ths.InstanceActor as Sim;

            foreach (Sim sim5 in travelers)
            {
                sim5.SkillManager.AddElement(SkillNames.Future);
            }

            BuffTransformation transformBuff = actor.BuffManager.TransformBuff;

            if (transformBuff != null)
            {
                actor.BuffManager.RemoveElement(transformBuff.Guid);
            }

            foreach (Sim sim6 in travelers)
            {
                transformBuff = sim6.BuffManager.TransformBuff;
                if (transformBuff != null)
                {
                    sim6.BuffManager.RemoveElement(transformBuff.Guid);
                }
            }

            if (GameUtils.IsFutureWorld())
            {
                SendEventForActorAndFollowers(actor, travelers, EventTypeId.kTravelToPresent);
            }
            else
            {
                SendEventForActorAndFollowers(actor, travelers, EventTypeId.kTravelToFuture);
            }

            ths.StandardEntry();
            ths.BeginCommodityUpdates();

            return(true);
        }
Esempio n. 5
0
        public static bool PreTimeTravel2(InteractionInstance ths)
        {
            Sim actor = ths.InstanceActor as Sim;

            if (GameUtils.IsFutureWorld())
            {
                EventTracker.SendEvent(EventTypeId.kTravelToPresent, actor);
            }
            else
            {
                EventTracker.SendEvent(EventTypeId.kTravelToFuture, actor);
            }

            ths.StandardEntry();
            ths.BeginCommodityUpdates();
            BuffTransformation transformBuff = actor.BuffManager.TransformBuff;

            if (transformBuff != null)
            {
                actor.BuffManager.RemoveElement(transformBuff.Guid);
            }

            return(true);
        }
Esempio n. 6
0
        public static bool PreTimeTravel2(InteractionInstance ths)
        {
            Sim actor = ths.InstanceActor as Sim;

            if (GameUtils.IsFutureWorld())
            {
                EventTracker.SendEvent(EventTypeId.kTravelToPresent, actor);
            }
            else
            {
                EventTracker.SendEvent(EventTypeId.kTravelToFuture, actor);
            }

            ths.StandardEntry();
            ths.BeginCommodityUpdates();
            BuffTransformation transformBuff = actor.BuffManager.TransformBuff;
            if (transformBuff != null)
            {
                actor.BuffManager.RemoveElement(transformBuff.Guid);
            }

            return true;
        }