Test for Biotech and only set xenotype if it's not null

This commit is contained in:
lutepickle 2022-11-04 08:59:39 -07:00
parent ea1c5794f9
commit 040ea6e672
1 changed files with 4 additions and 3 deletions

View File

@ -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;