From 5888458c464cdbedb9944072cc81d20e1f929526 Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Mon, 24 Oct 2022 16:53:54 -0700 Subject: [PATCH] Properly inherit genes from parents and copy to identical twins --- .../Hediff_MultiplePregnancy.cs | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 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 3c284e3..ecbe702 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs @@ -411,12 +411,12 @@ namespace RJW_Menstruation allowFood: false, allowAddictions: false, relationWithExtraPawnChanceFactor: 0, - //fixedMelanin: melanin, fixedLastName: lastname, kind: BabyPawnKindDecider(mother, father), //fixedIdeo: mother.Ideo, forbidAnyTitle: true, - forceNoBackstory: true + forceNoBackstory: true, + forcedEndogenes: PregnancyUtility.GetInheritedGenes(father, mother) ); int division = 1; @@ -435,17 +435,7 @@ namespace RJW_Menstruation { firstbaby = baby; request.FixedGender = baby.gender; - - if (baby.story != null) - { - // firstheadpath = (string)baby.story.GetMemberValue("headGraphicPath"); - // if (firstheadpath == null) - // { - // Graphic_Multi head = GraphicDatabaseHeadRecords.GetHeadRandom(baby.gender, baby.story.SkinColor, baby.story.crownType, true); - // if (head != null) baby.story.SetMemberValue("headGraphicPath", head.GraphicPath); - // firstheadpath = (string)baby.story.GetMemberValue("headGraphicPath"); - // } - } + request.ForcedEndogenes = baby.genes?.Endogenes.Select(gene => gene.def).ToList(); } else { @@ -453,11 +443,9 @@ namespace RJW_Menstruation if (baby.story != null) { + baby.story.headType = firstbaby.story.headType; baby.story.hairDef = firstbaby.story.hairDef; - //baby.story.hairColor = firstbaby.story.hairColor; baby.story.bodyType = firstbaby.story.bodyType; - //baby.story.crownType = firstbaby.story.crownType; - //baby.story.SetMemberValue("headGraphicPath", firstheadpath); } if (baby.IsHAR())