From 040ea6e67208ce5d495a411c73b8d98e20c743ff Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Fri, 4 Nov 2022 08:59:39 -0700 Subject: [PATCH] Test for Biotech and only set xenotype if it's not null --- .../RJW_Menstruation/Hediff_MultiplePregnancy.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs index 1142ff4..a52ca13 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs @@ -444,9 +444,10 @@ namespace RJW_Menstruation baby.genes.xenotypeName = mother.genes.xenotypeName; baby.genes.iconDef = mother.genes.iconDef; } - if (baby.genes != null) + if (baby.genes != null && ModsConfig.BiotechActive) { - baby.genes.SetXenotypeDirect(BabyXenoTypeDecider(mother, father, out bool hybridBaby)); + XenotypeDef xenoTypeDef = BabyXenoTypeDecider(mother, father, out bool hybridBaby); + if (xenoTypeDef != null) baby.genes.SetXenotypeDirect(xenoTypeDef); if(hybridBaby) { baby.genes.hybrid = true; @@ -465,7 +466,7 @@ namespace RJW_Menstruation baby.story.bodyType = firstbaby.story.bodyType; } - if (baby.genes != null) + if (baby.genes != null && ModsConfig.BiotechActive) { baby.genes.SetXenotypeDirect(firstbaby.genes.Xenotype); baby.genes.xenotypeName = firstbaby.genes.xenotypeName;