예제 #1
0
        public override bool Run()
        {
            try
            {
                Sim sim = Target as Sim;
                if (sim != null)
                {
                    string msg = null;
                    foreach (InteractionInstance instance in sim.InteractionQueue.InteractionList)
                    {
                        msg += Common.NewLine + Common.NewLine + instance.InteractionDefinition.GetType().AssemblyQualifiedName;

                        if (instance.InteractionDefinition is SocialInteractionA)
                        {
                            msg += Common.NewLine + "(" + instance.InteractionDefinition.ToString() + ")";
                        }
                    }

                    DebugEnabler.WriteLog(msg);

                    SimpleMessageDialog.Show(Common.Localize("CurrentInteraction:MenuName"), msg);
                }
                else
                {
                    string msg = null;

                    Sims3.Gameplay.Objects.RabbitHoles.CityHall cityHall = Target as Sims3.Gameplay.Objects.RabbitHoles.CityHall;
                    if (cityHall != null)
                    {
                        foreach (Sim member in LotManager.Actors)
                        {
                            if ((member.InteractionQueue != null) && (member.InteractionQueue.GetHeadInteraction() != null))
                            {
                                msg += Common.NewLine + member.SimDescription.FullName;
                                foreach (InteractionInstance instance in member.InteractionQueue.InteractionList)
                                {
                                    msg += Common.NewLine + Common.NewLine + instance.InteractionDefinition.GetType().AssemblyQualifiedName;

                                    if (instance.InteractionDefinition is SocialInteractionA.Definition)
                                    {
                                        msg += Common.NewLine + "(" + instance.InteractionDefinition.ToString() + ")";
                                    }
                                }
                            }
                        }
                    }

                    DebugEnabler.WriteLog(msg);
                }
            }
            catch (Exception exception)
            {
                Common.Exception(Actor, Target, exception);
            }
            return(true);
        }
예제 #2
0
        public override bool Run()
        {
            try
            {
                DebugEnabler.WriteLog(Target.GetResourceKey().ToString());

                SimpleMessageDialog.Show(Common.Localize("ResourceKey:MenuName"), Target.GetResourceKey().ToString());
            }
            catch (Exception exception)
            {
                Common.Exception(Actor, Target, exception);
            }
            return(true);
        }
예제 #3
0
파일: TypeName.cs 프로젝트: yakoder/NRaas
        public override bool Run()
        {
            try
            {
                string msg = Target.GetType().AssemblyQualifiedName;

                DebugEnabler.WriteLog(msg);

                SimpleMessageDialog.Show(Common.Localize("TypeName:MenuName"), msg);
            }
            catch (Exception exception)
            {
                Common.Exception(Actor, Target, exception);
            }
            return(true);
        }
예제 #4
0
        public override bool Run()
        {
            try
            {
                Sim target = Target as Sim;

                SimOutfit outfit = target.SimDescription.GetOutfit(target.CurrentOutfitCategory, target.CurrentOutfitIndex);

                DebugEnabler.WriteLog(outfit.Key.ToString());

                SimpleMessageDialog.Show(Common.Localize("ShowOutfitKey:MenuName"), outfit.Key.ToString());
            }
            catch (Exception exception)
            {
                Common.Exception(Actor, Target, exception);
            }
            return(true);
        }
예제 #5
0
        public override bool Run()
        {
            try
            {
                Sim sim = Target as Sim;
                if (sim != null)
                {
                    string msg = null;
                    foreach (Situation situation in sim.Autonomy.SituationComponent.Situations)
                    {
                        msg += Common.NewLine + ToString(situation);
                    }

                    DebugEnabler.WriteLog(msg);

                    SimpleMessageDialog.Show(Common.Localize("CurrentSituation:MenuName"), msg);
                }
                else
                {
                    Lot lot = Target as Lot;
                    if (lot != null)
                    {
                        string msg = null;
                        foreach (Situation situation in Situation.sAllSituations)
                        {
                            if (situation.Lot != lot)
                            {
                                continue;
                            }

                            msg += Common.NewLine + ToString(situation);
                        }

                        DebugEnabler.WriteLog(msg);

                        SimpleMessageDialog.Show(Common.Localize("CurrentSituation:MenuName"), msg);
                    }
                    else
                    {
                        string msg = null;

                        Sims3.Gameplay.Objects.RabbitHoles.CityHall cityHall = Target as Sims3.Gameplay.Objects.RabbitHoles.CityHall;
                        if (cityHall != null)
                        {
                            foreach (Sim member in LotManager.Actors)
                            {
                                if (member.Autonomy == null)
                                {
                                    continue;
                                }

                                if (member.Autonomy.SituationComponent == null)
                                {
                                    continue;
                                }

                                if (member.Autonomy.SituationComponent.Situations.Count > 0)
                                {
                                    msg += Common.NewLine + member.SimDescription.FullName;

                                    foreach (Situation situation in member.Autonomy.SituationComponent.Situations)
                                    {
                                        msg += Common.NewLine + " " + ToString(situation);
                                    }
                                }
                            }
                        }

                        DebugEnabler.WriteLog(msg);
                    }
                }
            }
            catch (Exception exception)
            {
                Common.Exception(Actor, Target, exception);
            }
            return(true);
        }