Little optimization in GetFertilizingInfo

This commit is contained in:
lutepickle 2022-09-05 19:18:02 -07:00
parent 1b0c25bc46
commit 17c4863a28

View file

@ -422,11 +422,7 @@ namespace RJW_Menstruation
if (eggs.NullOrEmpty()) return ""; if (eggs.NullOrEmpty()) return "";
string res = ""; string res = "";
int fertilized = 0; int fertilized = eggs.Count(egg => egg.fertilized);
foreach (Egg egg in eggs)
{
if (egg.fertilized) fertilized++;
}
if (fertilized != 0) res += fertilized + " " + Translations.Dialog_WombInfo05; if (fertilized != 0) res += fertilized + " " + Translations.Dialog_WombInfo05;
if (fertilized != 0 && eggs.Count - fertilized != 0) res += ", "; if (fertilized != 0 && eggs.Count - fertilized != 0) res += ", ";
if (cums.NullOrEmpty() || TotalFertCum == 0) if (cums.NullOrEmpty() || TotalFertCum == 0)