Move the xenotype inheritance fully into the gene null check, since it is possible with the hybrid system for two humans to make an animal

This commit is contained in:
lutepickle 2022-11-04 09:01:36 -07:00
parent 040ea6e672
commit db5813d768

View file

@ -439,13 +439,13 @@ namespace RJW_Menstruation
firstbaby = baby;
request.FixedGender = baby.gender;
request.ForcedEndogenes = baby.genes?.Endogenes.Select(gene => gene.def).ToList();
if (GeneUtility.SameHeritableXenotype(mother, father) && mother.genes.UniqueXenotype)
{
baby.genes.xenotypeName = mother.genes.xenotypeName;
baby.genes.iconDef = mother.genes.iconDef;
}
if (baby.genes != null && ModsConfig.BiotechActive)
{
if (GeneUtility.SameHeritableXenotype(mother, father) && mother.genes.UniqueXenotype)
{
baby.genes.xenotypeName = mother.genes.xenotypeName;
baby.genes.iconDef = mother.genes.iconDef;
}
XenotypeDef xenoTypeDef = BabyXenoTypeDecider(mother, father, out bool hybridBaby);
if (xenoTypeDef != null) baby.genes.SetXenotypeDirect(xenoTypeDef);
if(hybridBaby)