Don't do the initialization check for wombs that don't need to simulate yet (e.g. off-map NPCs).

This commit is contained in:
lutepickle 2022-09-21 16:07:56 -07:00
parent edf98da01d
commit 563bc3c820
2 changed files with 4 additions and 8 deletions

Binary file not shown.

View File

@ -622,6 +622,8 @@ namespace RJW_Menstruation
// If an exception makes it out, RW will remove the hediff, so catch it here
try
{
if (!ShouldSimulate()) return;
// Initialize immediately if needed, but if there's an error, then don't spam it every tick
if (!loaded && !initError)
{
@ -629,14 +631,8 @@ namespace RJW_Menstruation
Initialize();
}
if (
!Pawn.IsHashIntervalTick(tickInterval) ||
!ShouldSimulate()
)
{
return;
}
if (!Pawn.IsHashIntervalTick(tickInterval)) return;
if (initError) Log.Warning($"Attempting to process {Pawn}'s womb uninitialized");
if (Pregnancy != null && curStage != Stage.Pregnant)