Only remove cramps if no other womb is bleeding

This commit is contained in:
lutepickle 2022-12-27 06:52:33 -08:00
parent 398f1b7066
commit ba3f24cba3
2 changed files with 4 additions and 8 deletions

View File

@ -1528,7 +1528,7 @@ namespace RJW_Menstruation
if (curStageHrs >= currentIntervalHours)
{
Hediff hediff = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_MenstrualCramp);
if (hediff != null) Pawn.health.RemoveHediff(hediff);
if (hediff != null && !Pawn.GetMenstruationComps().Any(comp => comp != this && comp.curStage == Stage.Bleeding)) Pawn.health.RemoveHediff(hediff);
int totalFollicularHours = PeriodRandomizer(Stage.Follicular); // The total amount of time for both bleeding and follicular
if (totalFollicularHours <= currentIntervalHours) // We've bled for so long that we completely missed the follicular phase
GoOvulatoryStage();

View File

@ -1,4 +1,5 @@
using RimWorld;
using System.Linq;
using Verse;
namespace RJW_Menstruation
@ -61,17 +62,12 @@ namespace RJW_Menstruation
if (curStageHrs >= currentIntervalHours)
{
Hediff hediff = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_MenstrualCramp);
if (hediff != null) Pawn.health.RemoveHediff(hediff);
if (hediff != null && !Pawn.GetMenstruationComps().Any(comp => comp != this && comp.curStage == Stage.Bleeding)) Pawn.health.RemoveHediff(hediff);
estrusflag = false;
GoNextStage(Stage.Anestrus);
return;
}
else
{
if (curStageHrs < currentIntervalHours / 4) for (int i = 0; i < Configurations.CycleAcceleration; i++) BleedOut();
curStageHrs += Configurations.CycleAcceleration;
StayCurrentStage();
}
else base.BleedingAction();
}
protected override void PregnantAction()