diff --git a/Source/Animal_Inheritance/First.cs b/Source/Animal_Inheritance/First.cs deleted file mode 100644 index 8194ab3..0000000 --- a/Source/Animal_Inheritance/First.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using rjw; -using Verse; -using RimWorld; - -namespace RJW_BGS -{ - [StaticConstructorOnStartup] - internal static class First - { - static First() - { - //RJWcopy.Racegroupdictbuilder(); - //Prints all found race dicts (debugging only) - //logAllFoundRaceGroupGenes - - } - - private static void logAllFoundRaceGroupGenes() - { - foreach (RaceGroupDef def in DefDatabase.AllDefs) - { - Log.Message("defName = " + def.defName); - if (def.raceNames != null) - { - foreach (string race in def.raceNames) - { - Log.Message(race); - } - } - } - } - } -} diff --git a/Source/Animal_Inheritance/InheritanceUtility.cs b/Source/Animal_Inheritance/InheritanceUtility.cs index 1996589..1af9e8a 100644 --- a/Source/Animal_Inheritance/InheritanceUtility.cs +++ b/Source/Animal_Inheritance/InheritanceUtility.cs @@ -5,6 +5,7 @@ using System.Text; using System.Threading.Tasks; using Verse; using RimWorld; +using rjw; namespace RJW_BGS { @@ -115,5 +116,22 @@ namespace RJW_BGS } } + /// + /// Used only for debugging, to see what you loaded and how it looks. + /// + private static void logAllFoundRaceGroupGenes() + { + foreach (RaceGroupDef def in DefDatabase.AllDefs) + { + Log.Message("defName = " + def.defName); + if (def.raceNames != null) + { + foreach (string race in def.raceNames) + { + Log.Message(race); + } + } + } + } } } diff --git a/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs b/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs index 5224c4f..b6b228b 100644 --- a/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs +++ b/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs @@ -25,20 +25,21 @@ namespace RJW_BGS baby.genes = new Pawn_GeneTracker(baby); } + //Remove the hair and skin genes pawns always start with, should get correct ones from human parent anyway. for (int i = baby.genes.Endogenes.Count - 1; i >= 0; i--) { baby.genes.RemoveGene(baby.genes.Endogenes[i]); } - List genes = PregnancyUtility.GetInheritedGenes(dad, mother); + List humangenes = PregnancyUtility.GetInheritedGenes(dad, mother); List beastgenes = InheritanceUtility.AnimalInheritedGenes(dad, mother); InheritanceUtility.AddGenes(baby, beastgenes); - InheritanceUtility.AddGenes(baby, genes); - //foreach (GeneDef gene in genes) - //{ - // baby.genes.AddGene(gene, false); - //} + InheritanceUtility.AddGenes(baby, humangenes); + + // The mix-breed babies should be labelled hybrids + baby.genes.hybrid = true; + baby.genes.xenotypeName = "Hybrid"; } } }