From 8ff3771a0ecd1112fe4462ad773137b3c0ce627f Mon Sep 17 00:00:00 2001 From: ADHD_Coder Date: Mon, 17 Nov 2025 13:35:52 -0800 Subject: [PATCH] Fix UI so it displays the type of the vaginal the menstruationComp is linked to, instead of the first vagina the pawn has. --- .../RJW_Menstruation/UI/Dialog_WombStatus.cs | 2 +- 1.6/source/RJW_Menstruation/RJW_Menstruation/Utility.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/1.6/source/RJW_Menstruation/RJW_Menstruation/UI/Dialog_WombStatus.cs b/1.6/source/RJW_Menstruation/RJW_Menstruation/UI/Dialog_WombStatus.cs index 72706ef..7ead724 100644 --- a/1.6/source/RJW_Menstruation/RJW_Menstruation/UI/Dialog_WombStatus.cs +++ b/1.6/source/RJW_Menstruation/RJW_Menstruation/UI/Dialog_WombStatus.cs @@ -400,7 +400,7 @@ namespace RJW_Menstruation GUI.DrawTexture(genitalIconRect, vagina, ScaleMode.ScaleToFit); GUI.color = Color.white; - GUI.Label(genitalVaginaLabelRect, pawn.GetVaginaLabel(), fontstylecenter); + GUI.Label(genitalVaginaLabelRect, comp.GetVaginaLabel(), fontstylecenter); GUI.Label(genitalAnusLabelRect, pawn.GetAnusLabel(), fontstylecenter); } diff --git a/1.6/source/RJW_Menstruation/RJW_Menstruation/Utility.cs b/1.6/source/RJW_Menstruation/RJW_Menstruation/Utility.cs index 26deb88..8276e6d 100644 --- a/1.6/source/RJW_Menstruation/RJW_Menstruation/Utility.cs +++ b/1.6/source/RJW_Menstruation/RJW_Menstruation/Utility.cs @@ -344,10 +344,10 @@ namespace RJW_Menstruation } - public static string GetVaginaLabel(this Pawn pawn) + public static string GetVaginaLabel(this HediffComp_Menstruation comp) { - Hediff hediff = pawn.health.hediffSet.hediffs.Find(h => VariousDefOf.AllVaginas.Contains(h.def)); - return hediff.LabelBase.CapitalizeFirst() + "\n(" + hediff.LabelInBrackets + ")" + "\n" + xxx.CountOfSex.LabelCap.CapitalizeFirst() + ": " + pawn.records.GetAsInt(xxx.CountOfSex); + Hediff hediff = comp.parent; + return hediff.LabelBase.CapitalizeFirst() + "\n(" + hediff.LabelInBrackets + ")" + "\n" + xxx.CountOfSex.LabelCap.CapitalizeFirst() + ": " + comp.parent.pawn.records.GetAsInt(xxx.CountOfSex); } public static string GetAnusLabel(this Pawn pawn) {