protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging) { if (mDad != null) { return(null); } if (manager == null) { manager = Pregnancies; } ManagerStory.Story story = null; foreach (SimDescription baby in mBabies) { story = base.PrintStory(manager, name, new object[] { baby, Sim }, extended, logging); if (story != null) { story.mOverrideImage = "glb_tns_baby_coming_r2"; } } return(story); }
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); }
protected override ManagerStory.Story PrintStory(StoryProgressionObject manager, string name, object[] parameters, string[] extended, ManagerStory.StoryLogging logging) { ManagerStory.Story story = base.PrintStory(manager, name, parameters, extended, logging); if (story == null) { return(null); } story.mID2 = story.mID1; story.mID1 = new ManagerStory.Story.Element(Object.ObjectId); return(story); }
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); }
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); }
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); }
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()); } } }
protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging) { if (!ShouldReport) { return(null); } if (manager == null) { manager = Lots; } ManagerStory.Story story = base.PrintFormattedStory(manager, mStory, summaryKey, parameters, extended, logging); if (story != null) { story.mShowNoImage = true; } return(story); }
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); }
protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging) { if (mDad == null) { return(null); } if (manager == null) { manager = Pregnancies; } if (extended == null) { List <string> extendedArray = new List <string>(); foreach (SimDescription sim in mBabies) { extendedArray.Add(sim.FullName); } extended = extendedArray.ToArray(); } if (parameters == null) { parameters = new object[] { Sim, mDad }; } if (Sim.IsHuman) { if (mBabies.Count == 4) { text = Common.Localize("Pregnancy:Quadruplets", false, new object[] { mDad, Sim, mBabies[0], mBabies[1], mBabies[2], mBabies[3] }); } else if (mBabies.Count == 3) { text = Common.LocalizeEAString(false, "Gameplay/ActorSystems/Pregnancy:DadBabyBuffTriplets", new object[] { mDad, Sim, mBabies[0], mBabies[1], mBabies[2] }); } else if (mBabies.Count == 2) { text = Common.LocalizeEAString(false, "Gameplay/ActorSystems/Pregnancy:DadBabyBuffTwins", new object[] { mDad, Sim, mBabies[0], mBabies[1] }); } else if (mBabies[0].IsMale) { text = Common.LocalizeEAString(false, "Gameplay/ActorSystems/Pregnancy:DadBabyBuffBoy", new object[] { mDad, Sim, mBabies[0] }); } else if (mBabies[0].IsFemale) { text = Common.LocalizeEAString(false, "Gameplay/ActorSystems/Pregnancy:DadBabyBuffGirl", new object[] { mDad, Sim, mBabies[0] }); } } else { if (mBabies.Count == 4) { text = Common.Localize("PetPregnancy:Quadruplets" + Sim.Species, false, new object[] { mDad, Sim, Sim.Household.Name }); } else if (mBabies.Count == 3) { text = Common.Localize("PetPregnancy:Triplets" + Sim.Species, false, new object[] { mDad, Sim, Sim.Household.Name }); } else if (mBabies.Count == 2) { text = Common.Localize("PetPregnancy:Twins" + Sim.Species, mBabies[0].IsFemale, mBabies[1].IsFemale, new object[] { mDad, Sim, Sim.Household.Name }); } else { text = Common.Localize("PetPregnancy:Single" + Sim.Species, mBabies[0].IsFemale, new object[] { mDad, Sim, Sim.Household.Name }); } } ManagerStory.Story story = base.PrintFormattedStory(manager, text, summaryKey, parameters, extended, logging); if (story != null) { story.mOverrideImage = "glb_tns_baby_coming_r2"; } return(story); }