Don't let an egg implant if the father is destroyed

This commit is contained in:
lutepickle 2024-03-15 08:04:25 -07:00
parent 0004822059
commit 374a43c6e5

View file

@ -1383,9 +1383,9 @@ namespace RJW_Menstruation
egg.ticksSinceFertilization < minImplantAgeHours * GenDate.TicksPerHour ||
egg.ageTicks < Math.Min(Props.lutealIntervalDays * GenDate.TicksPerDay / 2, maxImplantDelayHours * GenDate.TicksPerHour))
continue;
else if (egg.fertilizer == null)
else if (egg.fertilizer == null || egg.fertilizer.Destroyed)
{
if (Configurations.Debug) Log.Message($"Could not implant {Pawn}'s egg due to null father");
if (Configurations.Debug) Log.Message($"Could not implant {Pawn}'s egg due to null or destroyed father");
deadeggs.Add(egg);
continue;
}