From cf2eff955624bf2ab385500d3e798b7a353d4b4f Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Sun, 25 Dec 2022 06:36:56 -0800 Subject: [PATCH] Move the biosculpter patch since it's not Biotech --- .../RJW_Menstruation/Patch/Biotech_Patch.cs | 12 ------------ .../RJW_Menstruation/Patch/Pawn_Patch.cs | 13 +++++++++++++ changelogs.txt | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) 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 708596c..4de0dfa 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 @@ -1,5 +1,4 @@ using HarmonyLib; -using System; using System.Linq; using RimWorld; using Verse; @@ -178,15 +177,4 @@ namespace RJW_Menstruation } } - [HarmonyPatch(typeof(CompBiosculpterPod), nameof(CompBiosculpterPod.CannotUseNowPawnCycleReason), new Type[] { typeof(Pawn), typeof(Pawn), typeof(CompBiosculpterPod_Cycle), typeof(bool) } )] - public class CannotUseNowPawnCycleReason_Patch - { - private const string eggRestorationKey = "eggRestoration"; - public static void Postfix(ref string __result, Pawn biosculptee, CompBiosculpterPod_Cycle cycle) - { - if (__result != null) return; - if(cycle.Props.key == eggRestorationKey && !biosculptee.GetMenstruationComps().Any()) - __result = Translations.CannotNoWomb; - } - } } \ No newline at end of file diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs index 97cb9c4..6c9846c 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs @@ -1,6 +1,8 @@ using HarmonyLib; using RimWorld; +using System; using System.Collections.Generic; +using System.Linq; using UnityEngine; using Verse; @@ -111,6 +113,17 @@ namespace RJW_Menstruation } + [HarmonyPatch(typeof(CompBiosculpterPod), nameof(CompBiosculpterPod.CannotUseNowPawnCycleReason), new Type[] { typeof(Pawn), typeof(Pawn), typeof(CompBiosculpterPod_Cycle), typeof(bool) })] + public class CannotUseNowPawnCycleReason_Patch + { + private const string eggRestorationKey = "eggRestoration"; + public static void Postfix(ref string __result, Pawn biosculptee, CompBiosculpterPod_Cycle cycle) + { + if (__result != null) return; + if (cycle.Props.key == eggRestorationKey && !biosculptee.GetMenstruationComps().Any()) + __result = Translations.CannotNoWomb; + } + } //Merged to RJW //[HarmonyPatch(typeof(PawnColumnWorker_Pregnant), "GetIconFor")] diff --git a/changelogs.txt b/changelogs.txt index e67ba4d..232f76f 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -1,5 +1,5 @@ Version 1.0.8.5 - - Added biosculptor recipe to restore 1 year's worth of eggs. + - Added biosculpter recipe to restore 1 year's worth of eggs. - Babies born from multiple pregnancy will properly produce the prompt to name them. Version 1.0.8.4