static void Postfix() { // if setting enabled, grow npc children if (SettingClass.Instance.NPCChildrenGrowthBoostEnabled) { int numberOfNobleChildrenGrow = 0; int numberOfNotableChildrenGrow = 0; if ((int)(Campaign.Current.CampaignStartTime.ElapsedDaysUntilNow % SettingClass.Instance.ChildrenGrowthCycle) == 0) { Hero.All.ToList <Hero>().ForEach((heroEle) => { if (heroEle.IsNoble && heroEle.Clan != Clan.PlayerClan) { if ((int)heroEle.Age < SettingClass.Instance.GrowthStopAge) { AgingSystemHelper.GrowTargetHero(heroEle); numberOfNobleChildrenGrow += 1; } } if (heroEle.IsNotable || heroEle.IsRuralNotable) { if ((int)heroEle.Age < SettingClass.Instance.GrowthStopAge) { GrowthDebug.LogInfo($"Handling Notable {heroEle.Name}", "Handling, notable"); AgingSystemHelper.GrowTargetHeroWithoutSideEffect(heroEle); numberOfNotableChildrenGrow += 1; } } }); } if (numberOfNobleChildrenGrow > 0) { InformationManager.DisplayMessage(SettingClass.CurrentLanguage == "zh" ? new InformationMessage($"今天卡拉迪亚大陆有{numberOfNobleChildrenGrow}个贵族孩子又长大了一岁", Colors.Cyan) : new InformationMessage( $"Today, {numberOfNobleChildrenGrow} noble children grow up faster in the world of Calradia", Colors.Cyan)); GrowthDebug.LogInfo($"Today, {numberOfNobleChildrenGrow} noble children grow faster in Calradia"); } if (numberOfNotableChildrenGrow > 0) { InformationManager.DisplayMessage(SettingClass.CurrentLanguage == "zh" ? new InformationMessage($"今天卡拉迪亚大陆有{numberOfNotableChildrenGrow}个要人孩子又长大了一岁", Colors.Cyan) : new InformationMessage( $"Today, {numberOfNotableChildrenGrow} notable children grow up faster in the world of Calradia", Colors.Cyan)); GrowthDebug.LogInfo( $"Today, {numberOfNotableChildrenGrow} notable children grow faster in Calradia"); } } if (Hero.MainHero.Children.Count != 0) { int cycleCeiling = SettingClass.Instance.ChildrenGrowthCycle; if ((int)(Campaign.Current.CampaignStartTime.ElapsedDaysUntilNow % cycleCeiling) == 0) { Hero.MainHero.Children.ForEach((Hero child) => { GrowthDebug.LogInfo($"Handling Your child {child.Name}"); GrowthDebug.LogInfo($"Your child is {child.Age} years old before"); GrowthDebug.LogInfo("Entering ForEach"); if (child.Age < SettingClass.Instance.GrowthStopAge) { AgingSystemHelper.GrowTargetHero(child); } }); } } }