Only show the button in the health tab for genitals, as opening the dialog for non-genital wombs causes errors.

This commit is contained in:
lutepickle 2023-09-29 21:11:22 -07:00
parent 4212fbab7b
commit ebf0db8ae6
4 changed files with 3 additions and 0 deletions

Binary file not shown.

View file

@ -1,5 +1,6 @@
using HarmonyLib; using HarmonyLib;
using RimWorld; using RimWorld;
using rjw;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -84,6 +85,7 @@ namespace RJW_Menstruation
{ {
foreach (Hediff diff in diffs) foreach (Hediff diff in diffs)
{ {
if (diff.Part != Genital_Helper.get_genitalsBPR(diff.pawn)) continue;
HediffComp_Menstruation comp = diff.GetMenstruationCompFromVagina(); HediffComp_Menstruation comp = diff.GetMenstruationCompFromVagina();
if (comp != null) return comp; if (comp != null) return comp;
} }

View file

@ -1,5 +1,6 @@
Version 1.0.9.2 Version 1.0.9.2
- Fixed the no bleeding gene having positive metabolic efficiency instead of negative. - Fixed the no bleeding gene having positive metabolic efficiency instead of negative.
- Removed status button in health tab for non-genitals to avoid errors.
- Handle errors more gracefully when starting a pregnancy. - Handle errors more gracefully when starting a pregnancy.
Version 1.0.9.1 Version 1.0.9.1