diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll index 2f6e949..61c3ebd 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 8e534ac..ced4ace 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/Patch/Pawn_Patch.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs index 1fb0bae..991f84a 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 @@ -54,61 +54,28 @@ namespace RJW_Menstruation } } - //[HarmonyPatch(typeof(HealthCardUtility), "DrawHediffListing")] - //public class DrawHediffListing_Patch - //{ - // public const float buttonWidth = 80f; - // public const float buttonHeight = 20f; - // - // public static void Postfix(Rect rect, Pawn pawn, bool showBloodLoss) - // { - // if (Configurations.EnableButtonInHT && pawn.HasMenstruationComp()) - // { - // Rect buttonrect = new Rect(rect.xMax - buttonWidth, rect.yMax - buttonHeight, buttonWidth, buttonHeight); - // if (Widgets.ButtonText(buttonrect, "Status")) - // { - // Dialog_WombStatus.ToggleWindow(pawn,pawn.GetMenstruationComp()); - // } - // } - // - // - // } - //} - - [HarmonyPatch(typeof(HealthCardUtility), "DrawHediffRow")] - public class DrawHediffRow_Patch + [HarmonyPatch(typeof(HealthCardUtility), "DrawOverviewTab")] + public class DrawOverviewTab_Patch { public const float buttonWidth = 50f; public const float buttonHeight = 20f; - private static HediffComp_Menstruation GetFirstMenstruation(IEnumerable diffs) + public static void Prefix(Rect leftRect, Pawn pawn, float curY) { - foreach (Hediff diff in diffs) + if (Configurations.EnableButtonInHT && pawn.ShowStatus() && pawn.ShouldCycle()) { - if (diff.Part != Genital_Helper.get_genitalsBPR(diff.pawn)) continue; - HediffComp_Menstruation comp = diff.GetMenstruationCompFromVagina(); - if (comp != null) return comp; - } - return null; - } - - public static void Prefix(Rect rect, Pawn pawn, IEnumerable diffs, ref float curY) - { - if (Configurations.EnableButtonInHT && pawn.ShowStatus()) - { - HediffComp_Menstruation comp = GetFirstMenstruation(diffs); + HediffComp_Menstruation comp = pawn.GetFirstMenstruationComp(); if (comp != null) { - Rect buttonrect = new Rect((rect.xMax) / 2 - 5f, curY + 2f, buttonWidth, buttonHeight); - if (Widgets.ButtonText(buttonrect, Translations.Button_HealthTab)) + Text.Font = GameFont.Tiny; + Rect buttonRect = new Rect(leftRect.xMax - buttonWidth - 8f, curY + 4f, buttonWidth, buttonHeight); + if (Widgets.ButtonText(buttonRect, Translations.Button_HealthTab)) { Dialog_WombStatus.ToggleWindow(pawn, comp); } } } - } - } [HarmonyPatch(typeof(CompBiosculpterPod), nameof(CompBiosculpterPod.CannotUseNowPawnCycleReason), new Type[] { typeof(Pawn), typeof(Pawn), typeof(CompBiosculpterPod_Cycle), typeof(bool) })] diff --git a/changelogs.txt b/changelogs.txt index 785309c..e35e6f7 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -6,6 +6,7 @@ Version 1.0.9.2 - 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. + - The womb status button will now appear in a pawn's health tab when using Compact Hediffs, with thanks to Fern. - Tampons and pads are now allowed by default in the worker, soldier, and slave starting outfits. Version 1.0.9.1