예제 #1
0
        public static void AddInteractions(Sims3.Gameplay.Objects.Electronics.Computer obj)
        {
            foreach (InteractionObjectPair pair in obj.Interactions)
            {
                if (pair.InteractionDefinition.GetType() == Version.Singleton.GetType())
                {
                    return;
                }
            }

            obj.AddInteraction(Version.Singleton);
        }
예제 #2
0
파일: WorkPusher.cs 프로젝트: yakoder/NRaas
        protected static ListenerAction OnObjectBought(Sims3.Gameplay.EventSystem.Event e)
        {
            if (e.Id == EventTypeId.kBoughtObject)
            {
                Sims3.Gameplay.Objects.Electronics.Computer obj = e.TargetObject as Sims3.Gameplay.Objects.Electronics.Computer;
                if (obj != null)
                {
                    AddInteractions(obj);
                }
            }

            return(ListenerAction.Keep);
        }