From 86aef069810bd0fe18c8471c1193d7e27b34cf77 Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Thu, 24 Nov 2022 07:12:30 -0800 Subject: [PATCH] Do the post-pregnancy breast growth for Biotech births. --- .../RJW_Menstruation/Patch/Biotech_Patch.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 b1e4f91..f9dc764 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 @@ -110,6 +110,16 @@ namespace RJW_Menstruation } } + [HarmonyPatch(typeof(PregnancyUtility), nameof(PregnancyUtility.ApplyBirthOutcome))] + public class ApplyBirthOutcome_Patch + { + public static void PostFix(Thing birtherThing) + { + if (birtherThing is Pawn pawn && !pawn.health.Dead) + pawn.GetBreastComp()?.GaveBirth(); + } + } + [HarmonyPatch(typeof(PregnancyUtility), nameof(PregnancyUtility.TryTerminatePregnancy))] public class TryTerminatePregnancy_Patch {