Use a switch in HighestEstrus

This commit is contained in:
lutepickle 2022-09-03 18:12:29 -07:00
parent 2b5d5443d3
commit 49f52891fe

View file

@ -338,9 +338,16 @@ namespace RJW_Menstruation
foreach(HediffComp_Menstruation comp in pawn.GetMenstruationComps())
{
HediffComp_Menstruation.EstrusLevel current = comp.GetEstrusLevel();
if (current == HediffComp_Menstruation.EstrusLevel.Visible) return HediffComp_Menstruation.EstrusLevel.Visible;
else if (current == HediffComp_Menstruation.EstrusLevel.Concealed) res = HediffComp_Menstruation.EstrusLevel.Concealed;
switch (comp.GetEstrusLevel())
{
case HediffComp_Menstruation.EstrusLevel.None:
break;
case HediffComp_Menstruation.EstrusLevel.Concealed:
res = HediffComp_Menstruation.EstrusLevel.Concealed;
break;
case HediffComp_Menstruation.EstrusLevel.Visible:
return HediffComp_Menstruation.EstrusLevel.Visible;
}
}
return res;