diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll index ae8c52b..443fe23 100644 Binary files a/1.4/Assemblies/RJW_Menstruation.dll and b/1.4/Assemblies/RJW_Menstruation.dll differ diff --git a/1.4/Languages/English/Keyed/RJW_Menstruation.xml b/1.4/Languages/English/Keyed/RJW_Menstruation.xml index d8d471e..8ff0f64 100644 --- a/1.4/Languages/English/Keyed/RJW_Menstruation.xml +++ b/1.4/Languages/English/Keyed/RJW_Menstruation.xml @@ -132,6 +132,7 @@ Custom Hybrid Editor Hybrids of {0} When {0} breed with {1}, {2} will be born at {3} chance. If both races have hybrid definitions for each other, the father's definition will be used. - + No eggs + \ No newline at end of file diff --git a/1.4/MilkModule/Assemblies/MilkModule.dll b/1.4/MilkModule/Assemblies/MilkModule.dll index 7c22131..0adf6be 100644 Binary files a/1.4/MilkModule/Assemblies/MilkModule.dll and b/1.4/MilkModule/Assemblies/MilkModule.dll differ diff --git a/1.4/Patches/Hediffs_PrivateParts_Breasts.xml b/1.4/Patches/Hediffs_PrivateParts_Breasts.xml index fff7a18..b3ef231 100644 --- a/1.4/Patches/Hediffs_PrivateParts_Breasts.xml +++ b/1.4/Patches/Hediffs_PrivateParts_Breasts.xml @@ -61,5 +61,16 @@ - + + + /Defs/rjw.HediffDef_PartBase[defName="UdderBreasts"] + + +
  • + Breasts_Udder/Breast + (55,20,0) +
  • +
    +
    +
    \ No newline at end of file diff --git a/1.4/RJW Menstruation Race Support/Patches/Hediffs_PrivateParts_Animal_RaceSupport.xml b/1.4/RJW Menstruation Race Support/Patches/Hediffs_PrivateParts_Animal_RaceSupport.xml index e2a3d47..e63d625 100644 --- a/1.4/RJW Menstruation Race Support/Patches/Hediffs_PrivateParts_Animal_RaceSupport.xml +++ b/1.4/RJW Menstruation Race Support/Patches/Hediffs_PrivateParts_Animal_RaceSupport.xml @@ -10,7 +10,7 @@ - + + + + /Defs/rjw.HediffDef_PartBase[defName="BovineVagina"] + + +
  • + 10 + 1.0 + 1.0 + 4 + 17 + 0 + 90 + 2 + Womb/Womb + Genitals/Vagina +
  • +
    +
    @@ -51,28 +71,108 @@ - + - /Defs/rjw.HediffDef_PartBase[defName="TreeVagina"] + /Defs/rjw.HediffDef_PartBase[defName="ElephantVagina"]
  • - 15 + 18 + 1.0 + 1.0 + 35 + 63 + 0 + 30 + 3 + Womb/Womb + Genitals/Vagina +
  • +
    +
    +
    + + + /Defs/rjw.HediffDef_PartBase[defName="HyenaVagina"] + + +
  • + 18 + 1.0 + 1.0 + 7 + 7 + 0 + 30 + 1 + Womb/Womb + Genitals/Vagina + true +
  • +
    +
    +
    + + + /Defs/rjw.HediffDef_PartBase[defName="MammalVagina"] + + +
  • + 10 + 1.0 + 1.0 + 14 + 14 + 0 + 30 + 3 + Womb/Womb + Genitals/Vagina +
  • +
    +
    +
    + + + /Defs/rjw.HediffDef_PartBase[defName="MarineVagina"] + + +
  • + 10 1.0 1.0 10 - 12 + 20 0 30 2 Womb/Womb Genitals/Vagina - Fall
  • + + /Defs/rjw.HediffDef_PartBase[defName="PigVagina"] + + +
  • + 18 + 1.0 + 1.0 + 6 + 14 + 0 + 24 + 2 + Womb/Womb + Genitals/Vagina +
  • +
    +
    +
    + /Defs/rjw.HediffDef_PartBase[defName="PistilVagina"] @@ -94,27 +194,6 @@ - - /Defs/rjw.HediffDef_PartBase[defName="NephilaSlimeVagina"] - - -
  • - 12 - 1.0 - 1.0 - 14 - 20 - 0 - 30 - 8 - Womb/Womb - Genitals/Vagina -
  • -
    -
    -
    - - /Defs/rjw.HediffDef_PartBase[defName="GhostVagina"] @@ -134,29 +213,5 @@ - - - - /Defs/rjw.HediffDef_PartBase[defName="NecroVagina"] - - -
  • - 10 - 0.1 - 0.1 - 14 - 14 - 0 - 0 - 1 - Womb/Womb - Genitals/Vagina - true -
  • -
    -
    -
    - - - +
    \ No newline at end of file diff --git a/1.4/RJW Menstruation Race Support/Patches/Hediffs_PrivateParts_Breasts_RaceSupport.xml b/1.4/RJW Menstruation Race Support/Patches/Hediffs_PrivateParts_Breasts_RaceSupport.xml index cd1f6cc..b5f0a5e 100644 --- a/1.4/RJW Menstruation Race Support/Patches/Hediffs_PrivateParts_Breasts_RaceSupport.xml +++ b/1.4/RJW Menstruation Race Support/Patches/Hediffs_PrivateParts_Breasts_RaceSupport.xml @@ -2,9 +2,21 @@ + + + /Defs/rjw.HediffDef_PartBase[defName="MammalBreasts"] + + +
  • + Breasts/Breast + (55,20,0) +
  • +
    +
    +
    - /Defs/rjw.HediffDef_PartBase[defName="BigRaceBreats"] + /Defs/rjw.HediffDef_PartBase[defName="CatBreasts"]
  • @@ -14,31 +26,6 @@ - - - /Defs/rjw.HediffDef_PartBase[defName="OrcBreasts"] - - -
  • - Breasts/Breast - (55,20,0) -
  • -
    -
    -
    - - - /Defs/rjw.HediffDef_PartBase[defName="GhoulBreasts"] - - -
  • - Breasts/Breast - (55,20,0) -
  • -
    -
    -
    - /Defs/rjw.HediffDef_PartBase[defName="GhostBreasts"] @@ -50,7 +37,28 @@ - + + /Defs/rjw.HediffDef_PartBase[defName="CactoidBreasts"] + + +
  • + Breasts/Breast + (55,20,0) +
  • +
    +
    +
    + + /Defs/rjw.HediffDef_PartBase[defName="GhoulBreasts"] + + +
  • + Breasts/Breast + (55,20,0) +
  • +
    +
    +
    /Defs/rjw.HediffDef_PartBase[defName="NecroBreasts"] @@ -62,9 +70,8 @@ - - /Defs/rjw.HediffDef_PartBase[defName="NephilaBreasts"] + /Defs/rjw.HediffDef_PartBase[defName="OrcBreasts"]
  • @@ -74,9 +81,8 @@ - - /Defs/rjw.HediffDef_PartBase[defName="NephilaSlimeBreasts"] + /Defs/rjw.HediffDef_PartBase[defName="ScaleBreasts"]
  • @@ -86,18 +92,16 @@ - - /Defs/rjw.HediffDef_PartBase[defName="UdderBreasts"] + /Defs/rjw.HediffDef_PartBase[defName="TreeBreasts"]
  • - Breasts_Udder/Breast + Breasts/Breast (55,20,0)
  • -
    \ No newline at end of file diff --git a/1.4/RJW Menstruation Race Support/Patches/Hediffs_PrivateParts_Humanlike_RaceSupport.xml b/1.4/RJW Menstruation Race Support/Patches/Hediffs_PrivateParts_Humanlike_RaceSupport.xml index 2629d3b..8f83940 100644 --- a/1.4/RJW Menstruation Race Support/Patches/Hediffs_PrivateParts_Humanlike_RaceSupport.xml +++ b/1.4/RJW Menstruation Race Support/Patches/Hediffs_PrivateParts_Humanlike_RaceSupport.xml @@ -105,7 +105,46 @@ - - - + + + /Defs/rjw.HediffDef_PartBase[defName="NecroVagina"] + + +
  • + 10 + 0.1 + 0.1 + 14 + 14 + 0 + 0 + 1 + Womb/Womb + Genitals/Vagina + true +
  • +
    +
    +
    + + + /Defs/rjw.HediffDef_PartBase[defName="TreeVagina"] + + +
  • + 15 + 1.0 + 1.0 + 10 + 12 + 0 + 30 + 2 + Womb/Womb + Genitals/Vagina + Fall +
  • +
    +
    +
    \ No newline at end of file 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 29b54cc..dc97bbf 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 @@ -1030,7 +1030,7 @@ namespace RJW_Menstruation if (cycleVariability < 0f) cycleVariability = MenstruationUtility.RandomVariabilityPercent(); if (currentIntervalHours < 0) { - if (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) curStage = Stage.Infertile; + if (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0 || Pawn.SterileGenes()) curStage = Stage.Infertile; else if (!IsBreedingSeason()) curStage = Stage.Anestrus; else curStage = RandomStage(); if (curStage == Stage.Follicular) @@ -1260,7 +1260,7 @@ namespace RJW_Menstruation case Configurations.PregnancyType.BaseRJW: if (Configurations.Debug) Log.Message($"Creating new base RJW pregnancy"); - PregnancyHelper.PregnancyDecider(Pawn, egg.fertilizer); + PregnancyHelper.AddPregnancyHediff(Pawn, egg.fertilizer); // I hate having to do this, but it gets the newest pregnancy List pregnancies = new List(); Pawn.health.hediffSet.GetHediffs(ref pregnancies); diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs index 2257c55..7bbdefb 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs @@ -2,6 +2,7 @@ using System.Linq; using RimWorld; using Verse; +using System.Collections.Generic; namespace RJW_Menstruation { @@ -61,4 +62,50 @@ namespace RJW_Menstruation __result = 0.999f; } } + + [HarmonyPatch(typeof(Recipe_ExtractOvum), nameof(Recipe_ExtractOvum.AvailableReport))] + public class ExtractOvum_AvailableReport_Patch + { + public static void PostFix(Thing thing, ref AcceptanceReport __result) + { + if (!__result.Accepted) return; + Pawn pawn = (Pawn)thing; + if (pawn.IsRJWPregnant()) + { + __result = "CannotPregnant".Translate(); + return; + } + List comps = pawn.GetMenstruationComps().ToList(); + if (!comps.Any()) return; + if (comps.All(comp => comp.ovarypower <= 0)) + { + __result = Translations.CannotNoEggs; + return; + } + return; + } + } + + [HarmonyPatch(typeof(Recipe_ExtractOvum), "OnSurgerySuccess")] + public class ExtractOvum_OnSurgerySuccess_Patch + { + public static void PostFix(Pawn pawn) + { + List comps = pawn.GetMenstruationComps().ToList(); + if (!comps.Any()) return; + HediffComp_Menstruation mostEggs = comps.MaxBy(comp => comp.ovarypower); + if (mostEggs.ovarypower <= 0) return; // Shouldn't happen + mostEggs.ovarypower--; + } + } + + [HarmonyPatch(typeof(Recipe_ImplantEmbryo), nameof(Recipe_ImplantEmbryo.ApplyOnPawn))] + public class ImplantEmbryo_ApplyOnPawn_Patch + { + public static void PostFix(Pawn pawn) + { + foreach (HediffComp_Menstruation comp in pawn.GetMenstruationComps()) + comp.TakeLoosePregnancy(); + } + } } \ No newline at end of file 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 5062aee..cb98f78 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 @@ -38,7 +38,7 @@ namespace RJW_Menstruation if (Genital_Helper.has_penis_fertile(pawn, pawnparts) && PregnancyHelper.CanImpregnate(pawn, partner, sextype)) { - PregnancyHelper.Doimpregnate(pawn, partner); + PregnancyHelper.DoImpregnate(pawn, partner); return false; } else if (Genital_Helper.has_ovipositorM(pawn, pawnparts)) @@ -95,7 +95,7 @@ namespace RJW_Menstruation } } - [HarmonyPatch(typeof(PregnancyHelper), nameof(PregnancyHelper.Doimpregnate))] + [HarmonyPatch(typeof(PregnancyHelper), nameof(PregnancyHelper.DoImpregnate))] public static class Doimpregnate_Patch { public static bool Prefix(Pawn pawn, Pawn partner) // partner has vagina diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Translations.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Translations.cs index 973a90b..35d95c8 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Translations.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Translations.cs @@ -135,6 +135,8 @@ namespace RJW_Menstruation public static readonly string Gizmo_GatherCum = "Gizmo_GatherCum".Translate(); public static readonly string FloatMenu_CleanSelf = "FloatMenu_CleanSelf".Translate(); + public static readonly string CannotNoEggs = "CannotNoEggs".Translate(); + public static readonly string CustomHybrid_List_Title = "CustomHybrid_List_Title".Translate(); static public string CustomHybrid_Title(string label) { return TranslatorFormattedStringExtensions.Translate("CustomHybrid_Title", label); } static public string CustomHybrid_Tooltip(string label, string breedee, string baby, string chance) { return TranslatorFormattedStringExtensions.Translate("CustomHybrid_Tooltip", label, breedee, baby, chance); } diff --git a/About/Manifest.xml b/About/Manifest.xml index a46c110..c88dc12 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -1,7 +1,7 @@ RJW Menstruation - 1.0.8.1 + 1.0.8.2 diff --git a/changelogs.txt b/changelogs.txt index f1d9b91..91640aa 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -1,3 +1,10 @@ +Version 1.0.8.2 + - Compatibility update for RJW 5.3.0.7 + - Requires RJW 5.3.0.7 + - Updated race support patches for new and removed vaginas. + - The Biotech extract ovum operation will now remove an egg from a pawn's ovaries. + - A pawn's womb should now recognize an implanted embryo. + Version 1.0.8.1 - Added the option for humans to start Biotech pregnancies if the DLC is enabled. If set, non-humans will use the old multiple pregnancy instead. - Babies conceived through the multiple pregnancy option will now properly inherit xenotypes.