Compare commits

...

2 commits

Author SHA1 Message Date
ADHD_Coder
47183d4006 Merge branch 'UI_vag_label_fix' into 'dev'
Fix UI so it displays the type of the linked vagina hediff

See merge request lutepickle/rjw_menstruation!14
2026-05-10 21:46:11 +00:00
ADHD_Coder
8ff3771a0e Fix UI so it displays the type of the vaginal the menstruationComp is linked to, instead of the first vagina the pawn has. 2025-11-17 13:55:13 -08:00
2 changed files with 4 additions and 4 deletions

View file

@ -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);
}

View file

@ -325,10 +325,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)
{