Esempio n. 1
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            if (mDeathType == SimDescription.DeathType.None)
            {
                mDeathType = ManagerDeath.GetRandomDeathType();
            }

            GettingOldScenario.AddDeathScenarios(this, frame);

            if (mKiller != null)
            {
                AddAssassinationKill(mKiller, Sim, false);
            }

            Manager.AddAlarm(new PostScenario(Sim, mDeathType, mStoryName));
            return(true);
        }
Esempio n. 2
0
        protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (manager == null)
            {
                manager = Deaths;
            }

            if (GetData <ManagerDeath.DyingSimData>(Sim).Notified)
            {
                return(null);
            }

            if (Sim.DeathStyle == SimDescription.DeathType.None)
            {
                return(null);
            }

            if (Notifications.HasSignificantRelationship(Household.ActiveHousehold, Sim))
            {
                Stories.AddSummary(manager, Sim, UnlocalizedName, null, logging);
                return(null);
            }

            SimDescription.DeathType deathStyle = Sim.DeathStyle;

            // Temporary until a story can be written
            switch (Sim.DeathStyle)
            {
            case SimDescription.DeathType.PetOldAgeBad:
            case SimDescription.DeathType.PetOldAgeGood:
                deathStyle = SimDescription.DeathType.OldAge;
                break;
            }

            text = "SimDied:" + deathStyle;

            ManagerStory.Story story = base.PrintFormattedStory(manager, ManagerDeath.ParseNotification(text, Sim.Household, Sim), summaryKey, parameters, extended, logging);

            if (story != null)
            {
                story.mShowNoImage = true;
            }

            return(story);
        }
Esempio n. 3
0
            protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
            {
                if (manager == null)
                {
                    manager = Deaths;
                }

                if (parameters == null)
                {
                    parameters = new object[] { Sim };
                }

                if (!Notifications.HasSignificantRelationship(Household.ActiveHousehold, Sim))
                {
                    return(base.PrintFormattedStory(manager, ManagerDeath.ParseNotification("SimGettingOld:TNS", Sim.Household, Sim), summaryKey, parameters, extended, logging));
                }
                else
                {
                    Stories.AddSummary(manager, Sim, UnlocalizedName, null, logging);
                }

                return(null);
            }