Exemplo n.º 1
0
 public override bool Run()
 {
     IntroTutorial.StartGameplayTutorial(Actor);
     Actor.Motives.MaxEverything();
     //SpeedTrap.Sleep(0u);
     IntroTutorial.ForceExitTutorial();
     return(true);
 }
Exemplo n.º 2
0
 public override bool Run()
 {
     IntroTutorial.StartGameplayTutorial(Actor);
     if (Actor.Motives != null)
     {
         Actor.Motives.MaxEverything();
     }
     IntroTutorial.ForceExitTutorial();
     return(true);
 }
Exemplo n.º 3
0
        public static bool Perform(SimDescription me, SimDescription.DeathType deathType)
        {
            if (me == null)
            {
                return(false);
            }

            Sim createdSim = me.CreatedSim;

            if (createdSim == PlumbBob.SelectedActor)
            {
                IntroTutorial.ForceExitTutorial();
                LotManager.SelectNextSim();
            }

            if (createdSim != null)
            {
                createdSim = Households.Reset.ResetSim(createdSim, false);

                if ((createdSim != null) && (createdSim.BuffManager != null))
                {
                    createdSim.BuffManager.RemoveAllElements();
                }
            }

            Urnstone urnstone = Urnstones.CreateGrave(me, deathType, true, true);

            if (urnstone == null)
            {
                SimpleMessageDialog.Show(Common.Localize("ForceKill:MenuName"), Common.Localize("ForceKill:Error"));
                return(false);
            }

            if (createdSim != null)
            {
                if ((createdSim.Autonomy != null) &&
                    (createdSim.Autonomy.SituationComponent != null))
                {
                    List <Situation> situations = new List <Situation>(createdSim.Autonomy.SituationComponent.Situations);
                    foreach (Situation situation in situations)
                    {
                        situation.Exit();
                    }
                }

                if (createdSim.LotCurrent != null)
                {
                    Lot lotCurrent = createdSim.LotCurrent;
                    lotCurrent.LastDiedSim = me;
                    lotCurrent.NumDeathsOnLot++;
                }

                if (createdSim.InteractionQueue != null)
                {
                    createdSim.InteractionQueue.CancelAllInteractions();
                }

                urnstone.GhostCleanup(createdSim, true);

                createdSim.Destroy();
            }

            return(true);
        }
Exemplo n.º 4
0
        public bool CleansingKill(SimDescription sim, SimDescription.DeathType deathType, bool cleanse)
        {
            AddTry("CleansingKill");

            if (!GameStates.IsLiveState)
            {
                IncStat("CleansingKill Mode Save");
                return(false);
            }

            string name = sim.FullName;

            if (cleanse)
            {
                Annihilation.CleanseGenealogy(sim);

                SetCleansed(sim);
            }

            bool bSuccess = false;

            Sim createdSim = sim.CreatedSim;

            if (createdSim != null)
            {
                try
                {
                    if (createdSim.InteractionQueue != null)
                    {
                        createdSim.InteractionQueue.CancelAllInteractions();

                        SpeedTrap.Sleep();
                    }

                    if ((deathType != SimDescription.DeathType.None) || (cleanse))
                    {
                        if (createdSim.Kill(deathType))
                        {
                            bSuccess = true;
                        }
                    }
                }
                catch (Exception e)
                {
                    Common.DebugException(createdSim, e);
                }
            }

            if (!bSuccess)
            {
                if (createdSim == PlumbBob.SelectedActor)
                {
                    IntroTutorial.ForceExitTutorial();
                }

                if (Sims == null)
                {
                    AddSuccess("CleansingKill: Destruct Fail");
                    return(false);
                }

                if (!Annihilation.Perform(sim, cleanse))
                {
                    Main.RemoveSim(sim.SimDescriptionId);
                }
                else
                {
                    if (!cleanse)
                    {
                        sim.Dispose(true, false, true);
                    }

                    // Special case to stop HangWithCoworker bounces
                    Careers.RemoveSim(sim.SimDescriptionId);
                }

                bSuccess = true;
            }

            if (bSuccess)
            {
                AddSuccess("CleansingKill: Success");

                IncStat("Killed: " + name, Common.DebugLevel.High);

                return(true);
            }
            else
            {
                return(false);
            }
        }