Refactor the egg removing logic to make it a bit clearer

This commit is contained in:
lutepickle 2023-10-23 09:57:52 -07:00
parent 9a19dc3c25
commit e8710149e5

View file

@ -1508,9 +1508,21 @@ namespace RJW_Menstruation
}
}
if (pregnant &&
(Configurations.PregnancySource != Configurations.PregnancyType.MultiplePregnancy || !Configurations.EnableHeteroOvularTwins) &&
(Configurations.PregnancySource != Configurations.PregnancyType.Biotech || !Configurations.EnableBiotechTwins || !Configurations.EnableHeteroOvularTwins))
bool clearAllEggs = true;
switch (Configurations.PregnancySource)
{
case Configurations.PregnancyType.BaseRJW:
clearAllEggs = true;
break;
case Configurations.PregnancyType.MultiplePregnancy:
clearAllEggs = !Configurations.EnableHeteroOvularTwins;
break;
case Configurations.PregnancyType.Biotech:
clearAllEggs = !(Configurations.EnableBiotechTwins && Configurations.EnableHeteroOvularTwins);
break;
}
if (pregnant && clearAllEggs)
eggs.Clear();
else
eggs.RemoveAll(egg => deadeggs.Contains(egg));