Tiny refactor to adding stacked eggs to ovulation

This commit is contained in:
lutepickle 2022-07-11 08:40:40 -07:00
parent 6ec27b6aba
commit 902cd65375

View file

@ -1326,17 +1326,18 @@ namespace RJW_Menstruation
float eggnum; float eggnum;
try try
{ {
eggnum = Rand.ByCurve(parent.pawn.RaceProps.litterSizeCurve) + eggstack; eggnum = Rand.ByCurve(parent.pawn.RaceProps.litterSizeCurve);
} }
catch(NullReferenceException) catch(NullReferenceException)
{ {
eggnum = 1 + eggstack; eggnum = 1;
} }
catch(ArgumentException e) catch(ArgumentException e)
{ {
Log.Warning($"Invalid litterSizeCurve for {parent.pawn.RaceProps}: {e}"); Log.Warning($"Invalid litterSizeCurve for {parent.pawn.RaceProps}: {e}");
eggnum = 1 + eggstack; eggnum = 1;
} }
eggnum += eggstack;
do do
{ {