Пример #1
0
        protected void PrintStory(bool notify)
        {
            ManagerStory.Story story = null;

            ManagerStory.StoryLogging logging = ManagerStory.StoryLogging.Log;
            if (notify)
            {
                logging |= ManagerStory.StoryLogging.Summary | ManagerStory.StoryLogging.Notice;
            }

            story = PrintStory(null, GetTitlePrefix(PrefixType.Story), null, null, logging);
            if (story == null)
            {
                story = PrintFormattedStory(null, null, GetTitlePrefix(PrefixType.Summary), null, null, logging);
                if (story != null)
                {
                    IncStat("PrintFormattedStory Success");
                }
            }
            else
            {
                IncStat("PrintStory Success");

                story.Delay = ReportDelay;
            }

            if (story == null)
            {
                story = PrintDebuggingStory(null);
                if (story != null)
                {
                    IncStat("PrintDebuggingStory Success");
                }
            }

            if (story != null)
            {
                if ((Scenarios != null) && (Scenarios.TrackingID == ID))
                {
                    IncStat(story.ToString());
                }
            }
        }
Пример #2
0
            protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
            {
                if (manager == null)
                {
                    manager = Skills;
                }

                Skill skill = Sim.SkillManager.GetElement(mSkill);

                if (skill == null)
                {
                    return(null);
                }

                if (extended == null)
                {
                    extended = new string[] { skill.Name, EAText.GetNumberString(mLevel) };
                }

                if (mLevel == 0)
                {
                    text = skill.Description;
                }
                else
                {
                    string entryKey = skill.LevelUpStrings[mLevel];
                    if (!string.IsNullOrEmpty(entryKey))
                    {
                        text = Common.LocalizeEAString(skill.SkillOwner.IsFemale, "Gameplay/Skills/Skill:SkillLevelIncreasedDialogText", new object[] { skill.SkillOwner, skill.Name, mLevel }) + Common.NewLine + Common.NewLine + Common.LocalizeEAString(skill.SkillOwner.IsFemale, entryKey, new object[] { skill.SkillOwner });
                    }
                    else
                    {
                        text = Common.LocalizeEAString(skill.SkillOwner.IsFemale, "Gameplay/Skills/Skill:SkillLevelIncreasedDialogText", new object[] { skill.SkillOwner, skill.Name, mLevel });
                    }
                }

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

                if (story != null)
                {
                    story.mOverrideImage   = skill.NonPersistableData.DreamsAndPromisesIcon;
                    story.mOverrideVersion = skill.NonPersistableData.SkillProductVersion;
                }

                return(story);
            }
Пример #3
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (Sim.Child)
            {
                name += "Child";
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #4
0
        protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (manager == null)
            {
                manager = Careers;
            }

            if ((extended == null) && (Sim.Occupation != null))
            {
                extended = new string[] { Sim.Occupation.GetLocalizedCareerName(Sim.IsFemale), EAText.GetNumberString(Sim.Occupation.Level) };
            }

            text = Common.LocalizeEAString(Sim.IsFemale, "Gameplay/Careers/Career:Demotion", new object[] { Sim, Event.Career.CurLevelJobTitle });

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

            if (story != null)
            {
                story.mOverrideImage = Event.Career.CareerIconColored;
            }

            return(story);
        }
Пример #5
0
        protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (manager == null)
            {
                manager = Careers;
            }

            if (extended == null)
            {
                if (Event.Career is School)
                {
                    extended = new string[] { Event.Career.GetLocalizedCareerName(Sim.IsFemale) };
                }
                else
                {
                    extended = new string[] { Event.Career.GetLocalizedCareerName(Sim.IsFemale), EAText.GetNumberString(Event.Career.Level) };
                }
            }

            ManagerStory.Story story = base.PrintFormattedStory(manager, mText, summaryKey, parameters, extended, logging);

            if (story != null)
            {
                story.mOverrideImage = Event.Career.CareerIconColored;
            }

            return(story);
        }
Пример #6
0
            protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
            {
                if (SimTypes.IsSelectable(Sim))
                {
                    return(null);
                }

                if (mOldLevel >= Sim.CelebrityLevel)
                {
                    return(null);
                }

                if ((Sim.CelebrityLevel <= 1) && (!GetValue <ShowFirstLevelOption, bool>()))
                {
                    IncStat("First Level Denied");
                    return(null);
                }

                CelebrityManager celebrityManager = Sim.CelebrityManager;

                CelebrityLevelStaticData currentLevelStaticData = celebrityManager.GetCurrentLevelStaticData();

                if (currentLevelStaticData != null)
                {
                    string levelUpTnsLocalizationKey = currentLevelStaticData.LevelUpTnsLocalizationKey;
                    if (levelUpTnsLocalizationKey != null)
                    {
                        text = CelebrityManager.LocalizeSpreadsheetString(Sim.IsFemale, levelUpTnsLocalizationKey, new object[] { celebrityManager.LevelName, Sim });
                    }
                }

                if (extended == null)
                {
                    extended = new string[] { EAText.GetNumberString(Sim.CelebrityLevel) };
                }

                return(base.PrintFormattedStory(manager, text, "0x635e705292bc4b00", parameters, extended, logging));
            }
Пример #7
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (manager == null)
            {
                manager = Friends;
            }

            if (string.IsNullOrEmpty(name))
            {
                return(null);
            }

            if (!Sim.IsHuman)
            {
                name += "Pet";
            }
            else if (Sim.Partner == Target)
            {
                name += "Partner";
            }
            else if ((Sim.ToddlerOrBelow) || (Target.ToddlerOrBelow))
            {
                name += "Toddler";
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #8
0
        protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (mInheritors.Count == 0)
            {
                return(null);
            }

            if (manager == null)
            {
                manager = Deaths;
            }

            if (text == null)
            {
                text = GetTitlePrefix(PrefixType.Summary);
            }

            return(Stories.PrintFormattedSummary(Deaths, text, summaryKey, Sim, new List <SimDescription>(mInheritors.Keys), extended, logging));
        }
Пример #9
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (mLoser != Sim)
            {
                name += "Success";

                parameters = new object[] { Sim, mLoser };
            }

            return base.PrintStory(manager, name, parameters, extended, logging);
        }
Пример #10
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (manager == null)
            {
                manager = Romances;
            }

            if (parameters == null)
            {
                parameters = new object[] { Sim, Sim.Partner, Lot };
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #11
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (House.LotHome == null)
            {
                name = "HomelessDebtForgiven";
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #12
0
            protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
            {
                if (parameters == null)
                {
                    parameters = new object[] { Sim, Target, Funds, mRepaired.CatalogName };
                }

                return(base.PrintStory(manager, name, parameters, extended, logging));
            }
Пример #13
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (manager == null)
            {
                manager = Friends;
            }

            if (!Sim.IsHuman)
            {
                if (string.IsNullOrEmpty(name))
                {
                    return(null);
                }

                name += "Pet";
            }
            else if (mNemesis)
            {
                SimPersonality clan = Manager as SimPersonality;
                if (clan != null)
                {
                    if (clan.Me != Sim)
                    {
                        return(null);
                    }
                }

                name = "Nemesis";
            }
            else if (Sim.Partner == Target)
            {
                if (string.IsNullOrEmpty(name))
                {
                    return(null);
                }

                name += "Partner";
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #14
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (manager == null)
            {
                manager = Lots;
            }

            if (parameters == null)
            {
                if (Sim.Household == null)
                {
                    return(null);
                }

                return(Stories.PrintStory(manager, name, Sim.Household, extended, logging));
            }
            else
            {
                return(base.PrintStory(manager, name, parameters, extended, logging));
            }
        }
Пример #15
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (name == null)
            {
                return(null);
            }

            if (manager == null)
            {
                manager = Lots;
            }

            if ((House != null) && (parameters == null))
            {
                List <SimDescription> houseSims = new List <SimDescription>(HouseholdsEx.Humans(House));

                for (int i = houseSims.Count - 1; i >= 0; i--)
                {
                    if (houseSims[i].ChildOrAbove)
                    {
                        continue;
                    }

                    houseSims.RemoveAt(i);
                }

                if (houseSims.Count == 1)
                {
                    name      += "Single";
                    parameters = new object[] { houseSims[0], House.LotHome };
                }
                else if (houseSims.Count == 2)
                {
                    if (DuoSameHouse(houseSims[0], houseSims[1]))
                    {
                        name += "DuoSameHome";
                    }
                    else
                    {
                        name += "Duo";
                    }
                    parameters = new object[] { houseSims[0], houseSims[1], House.LotHome };
                }
                else
                {
                    SimDescription head = SimTypes.HeadOfFamily(House);

                    string names = ManagerStory.CreateNameString(houseSims, head).ToString();

                    parameters = new object[] { head, names, House.LotHome };
                }
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #16
0
        protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (Sim.Species == CASAgeGenderFlags.Human)
            {
                text = AgingManager.LocalizeString(Sim.IsFemale, "AgeTo" + Sim.Age, new object[] { Sim });
            }
            else if (Sim.IsADogSpecies)
            {
                text = Common.Localize("AgeUpDog:" + Sim.Age, Sim.IsFemale, new object[] { Sim });
            }
            else
            {
                text = Common.Localize("AgeUp" + Sim.Species + ":" + Sim.Age, Sim.IsFemale, new object[] { Sim });
            }

            if (string.IsNullOrEmpty(text))
            {
                return(null);
            }

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

            if (extended == null)
            {
                extended = new string[] { Common.LocalizeEAString("UI/Feedback/CAS:" + Sim.Age) };
            }

            logging |= ManagerStory.StoryLogging.Full;

            return(base.PrintFormattedStory(manager, text, summaryKey, parameters, extended, logging));
        }
Пример #17
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (mInheritors.Count > 0)
            {
                return(null);
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #18
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (manager == null)
            {
                manager = Money;
            }

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

            if (mTotalPayments == 0)
            {
                name += "Fail";
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #19
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (mNemesis)
            {
                SimPersonality clan = Manager as SimPersonality;
                if (clan != null)
                {
                    if (clan.Me != Sim)
                    {
                        return(null);
                    }
                }

                name = "Nemesis";
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #20
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (manager == null)
            {
                manager = Skills;
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #21
0
        protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (parameters == null)
            {
                if (Lot == null)
                {
                    return(null);
                }

                if (Lot.Name == null)
                {
                    return(null);
                }

                parameters = new object[] { Lot };
            }

            return(base.PrintFormattedStory(manager, text, summaryKey, parameters, extended, logging));
        }
Пример #22
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (parameters == null)
            {
                if (mRabbitHole != null)
                {
                    parameters = new object[] { Sim, mRabbitHole.CatalogName };
                }
                else if (mLot != null)
                {
                    parameters = new object[] { Sim, mLot.Name };
                }
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #23
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (mWasMarried)
            {
                name = "Married" + name;
            }
            else
            {
                name = "Steady" + name;
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #24
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (parameters == null)
            {
                if (mHead == null)
                {
                    return(null);
                }

                parameters = new object[] { mHead };
            }

            ManagerStory.Story story = base.PrintStory(manager, name, parameters, extended, logging);
            if (story != null)
            {
                story.mShowNoImage = true;
            }
            return(story);
        }
Пример #25
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (parameters == null)
            {
                parameters = new object[] { Sim, Target, mTrait };
            }

            if (extended == null)
            {
                extended = new string[] { mTrait };
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #26
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if ((mPartner != null) && (parameters == null))
            {
                parameters = new object[] { Sim, mPartner };

                name += "Duo";
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #27
0
        protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (manager == null)
            {
                manager = Careers;
            }

            if ((mTone != null) && (DebuggingEnabled))
            {
                text = "(D)" + UnlocalizedName + ": " + mTone;
            }

            return(base.PrintFormattedStory(manager, text, summaryKey, parameters, extended, logging));
        }
Пример #28
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (manager == null)
            {
                manager = Situations;
            }

            if ((parameters == null) && (mReason != null))
            {
                parameters = new object[] { Sim, mReason.CatalogName };
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #29
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (parameters == null)
            {
                parameters = new object[] { Sim, mFunds };
            }

            if (extended == null)
            {
                extended = new string[] { EAText.GetNumberString(mFunds) };
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }
Пример #30
0
        protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (parameters == null)
            {
                if (mSteal > 0)
                {
                    name += "AndSteal";
                }

                parameters = new object[] { Sim, Target, Funds + mSteal, mSteal };
            }

            return(base.PrintStory(manager, name, parameters, extended, logging));
        }