From a8af20d024a09879148954bb0e6b6abca0df5634 Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Sun, 29 Oct 2023 16:21:27 -0700 Subject: [PATCH] Make Implant adding to biotech pregnancy use the casted Hediff_Pregnant --- .../RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs index 84a26aa..b316f5b 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs @@ -1468,9 +1468,9 @@ namespace RJW_Menstruation { case Hediff_Pregnant vanillaPreg: // Not going to do the labor ones if (!Configurations.EnableBiotechTwins || !Configurations.EnableHeteroOvularTwins) goto default; - if (Configurations.Debug) Log.Message($"Adding to existing Biotech pregnancy {pregnancy.GetUniqueLoadID()}"); - HediffComp_PregeneratedBabies comp = pregnancy.TryGetComp(); - if (comp == null) Log.Warning($"Trying to add Biotech egg to {Pawn}'s pregnancy without a pregenerated baby comp: {pregnancy.GetUniqueLoadID()}"); + if (Configurations.Debug) Log.Message($"Adding to existing Biotech pregnancy {vanillaPreg.GetUniqueLoadID()}"); + HediffComp_PregeneratedBabies comp = vanillaPreg.TryGetComp(); + if (comp == null) Log.Warning($"Trying to add Biotech egg to {Pawn}'s pregnancy without a pregenerated baby comp: {vanillaPreg.GetUniqueLoadID()}"); else { comp.AddNewBaby(Pawn, egg.fertilizer);