diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll index 5c4fbdb..2f6e949 100644 Binary files a/1.4/Assemblies/RJW_Menstruation.dll and b/1.4/Assemblies/RJW_Menstruation.dll differ diff --git a/1.4/MilkModule/Assemblies/MilkModule.dll b/1.4/MilkModule/Assemblies/MilkModule.dll index 84a342d..8e534ac 100644 Binary files a/1.4/MilkModule/Assemblies/MilkModule.dll and b/1.4/MilkModule/Assemblies/MilkModule.dll differ diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs index 38df276..63b7c7a 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs @@ -397,7 +397,12 @@ namespace RJW_Menstruation { if (!Configurations.EnableAnimalCycle && pawn.IsAnimal()) return false; if (pawn.RaceHasOviPregnancy()) return false; - // TODO: Exclude egglaying genes + if (ModsConfig.BiotechActive && pawn.genes != null) + { + foreach (Gene gene in pawn.genes.GenesListForReading) + if (VariousDefOf.EggLayerGenes.Contains(gene.def)) return false; + } + return true; } diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/VariousDefOf.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/VariousDefOf.cs index 9122331..6cb6f8b 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/VariousDefOf.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/VariousDefOf.cs @@ -69,6 +69,7 @@ namespace RJW_Menstruation private static HashSet allvaginas = null; private static HashSet allanuses = null; private static HashSet allbreasts = null; + private static HashSet egglayergenes = null; public static List AllRaces { @@ -161,6 +162,21 @@ namespace RJW_Menstruation return allbreasts; } } + public static HashSet EggLayerGenes + { + get + { + if (egglayergenes != null) return egglayergenes; + egglayergenes = new HashSet(); + + GeneDef AG_EggLaying = DefDatabase.GetNamedSilentFail("AG_EggLaying"); // Alpha Genes + GeneDef VRESaurids_Oviparous = DefDatabase.GetNamedSilentFail("VRESaurids_Oviparous"); // VE Saurid + if (AG_EggLaying != null) egglayergenes.Add(AG_EggLaying); + if (VRESaurids_Oviparous != null) egglayergenes.Add(VRESaurids_Oviparous); + + return egglayergenes; + } + } // Defs from Milkable Colonists public static readonly HediffDef Hediff_Lactating_Drug = DefDatabase.GetNamedSilentFail("Lactating_Drug"); diff --git a/changelogs.txt b/changelogs.txt index 964b579..785309c 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -5,6 +5,7 @@ Version 1.0.9.2 - Handle errors more gracefully when starting a pregnancy. - Fix implanting multiple eggs in an animal when configured to use Biotech pregnancies. - Egglaying races no longer have a menstrual cycle, regardless of vagina type. + - Pawns with the egglaying genes from Alpha Genes or VE Saurids no longer have a menstrual cycle. - Tampons and pads are now allowed by default in the worker, soldier, and slave starting outfits. Version 1.0.9.1