diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll index 528bef1..69b11bd 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 4e3a2ae..84a342d 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/HediffComp_Breast.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs index cbee5b3..eacab7d 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs @@ -150,7 +150,7 @@ namespace RJW_Menstruation public bool ShouldSimulate() { - if (!Configurations.EnableAnimalCycle && Pawn.IsAnimal()) return false; + if (!Pawn.ShouldCycle()) return false; if (Pawn.SpawnedOrAnyParentSpawned || Pawn.IsCaravanMember() || PawnUtility.IsTravelingInTransportPodWorldObject(Pawn)) return true; return false; diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs index 1d25304..43eb4e4 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs @@ -714,7 +714,7 @@ namespace RJW_Menstruation public bool ShouldSimulate() { - if (!Configurations.EnableAnimalCycle && Pawn.IsAnimal()) return false; + if (!Pawn.ShouldCycle()) return false; if (Pawn.SpawnedOrAnyParentSpawned || Pawn.IsCaravanMember() || PawnUtility.IsTravelingInTransportPodWorldObject(Pawn)) return true; return false; 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 ffd37aa..0edd470 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs @@ -403,6 +403,14 @@ namespace RJW_Menstruation else return variability; } + public static bool ShouldCycle(this Pawn pawn) + { + if (!Configurations.EnableAnimalCycle && pawn.IsAnimal()) return false; + if (pawn.RaceHasOviPregnancy()) return false; + // TODO: Exclude egglaying genes + return true; + } + public static bool IsInEstrus(this Pawn pawn, bool visible = true) { if (pawn.Dead) return false; diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs index 8299c26..31a3688 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs @@ -24,7 +24,7 @@ namespace RJW_Menstruation if (sextype != xxx.rjwSextype.Vaginal && sextype != xxx.rjwSextype.DoublePenetration) return true; - if (partner.IsAnimal() && !Configurations.EnableAnimalCycle) return true; + if (!partner.ShouldCycle()) return true; if (!InteractionCanCausePregnancy(props)) return false; @@ -100,7 +100,7 @@ namespace RJW_Menstruation { public static bool Prefix(Pawn pawn, Pawn partner) // partner has vagina { - if (partner.IsAnimal() && !Configurations.EnableAnimalCycle) return true; + if (!partner.ShouldCycle()) return true; HediffComp_Menstruation comp; if (pawn.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish) || partner.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish) || partner.IsInEstrus()) comp = partner.GetFertileMenstruationComp(); @@ -125,7 +125,7 @@ namespace RJW_Menstruation { private static bool PregnancyBlocksImpregnation(this Pawn pawn, bool _) { - if (!Configurations.EnableAnimalCycle && pawn.IsAnimal()) return pawn.IsPregnant(); + if (!pawn.ShouldCycle()) return pawn.IsPregnant(); else if (pawn.GetMenstruationComps().Any()) return false; else return pawn.IsPregnant(); } @@ -347,7 +347,7 @@ namespace RJW_Menstruation if (__instance.Sexprops.usedCondom) return; if (AndroidsCompatibility.IsAndroid(pawn)) return; if (!Impregnate_Patch.InteractionCanCausePregnancy(__instance.Sexprops)) return; - if (!Configurations.EnableAnimalCycle && xxx.is_animal(partner)) return; + if (!partner.ShouldCycle()) return; // Archotech penises have more control. Or something. CompHediffBodyPart penisComp = pawn.GetGenitalsList()?.Find(genital => (genital as Hediff_PartBaseNatural)?.def.defName.ToLower().Contains("penis") ?? false)?.TryGetComp(); diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Utility.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Utility.cs index 09ad64a..1e8a490 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Utility.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Utility.cs @@ -448,7 +448,7 @@ namespace RJW_Menstruation { if (!Configurations.EnableWombIcon) return false; if (pawn.Drafted && !Configurations.EnableDraftedIcon) return false; - if (pawn.IsAnimal() && !Configurations.EnableAnimalCycle) return false; + if (!pawn.ShouldCycle()) return false; return true; } diff --git a/changelogs.txt b/changelogs.txt index 2e68aa8..336864e 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -2,6 +2,7 @@ Version 1.0.9.2 - Fixed the no bleeding gene having positive metabolic efficiency instead of negative. - Removed status button in health tab for non-genitals to avoid errors. - Handle errors more gracefully when starting a pregnancy. + - Egglaying races no longer have a menstrual cycle, regardless of vagina type. Version 1.0.9.1 - Japanese translation for most text by Lokuzt.