Turn the def in SetEstrus into a ternary

This commit is contained in:
lutepickle 2022-05-18 20:57:48 -07:00
parent 26ca087828
commit 7f2856b6ef

View file

@ -1033,10 +1033,7 @@ namespace RJW_Menstruation
public void SetEstrus(int days)
{
HediffDef estrusdef;
if (Props.concealedEstrus) estrusdef = VariousDefOf.Hediff_Estrus_Concealed;
else estrusdef = VariousDefOf.Hediff_Estrus;
HediffDef estrusdef = Props.concealedEstrus ? VariousDefOf.Hediff_Estrus_Concealed : VariousDefOf.Hediff_Estrus;
HediffWithComps hediff = (HediffWithComps)parent.pawn.health.hediffSet.GetFirstHediffOfDef(estrusdef);
if (hediff != null)
{