mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Refactor HighestEstrus
This commit is contained in:
parent
2516ed1439
commit
c9c5e70246
1 changed files with 4 additions and 17 deletions
|
@ -395,23 +395,10 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
public static HediffComp_Menstruation.EstrusLevel HighestEstrus(this Pawn pawn)
|
public static HediffComp_Menstruation.EstrusLevel HighestEstrus(this Pawn pawn)
|
||||||
{
|
{
|
||||||
HediffComp_Menstruation.EstrusLevel res = HediffComp_Menstruation.EstrusLevel.None;
|
return pawn.GetMenstruationComps().
|
||||||
|
Select(comp => comp.GetEstrusLevel()).
|
||||||
foreach(HediffComp_Menstruation comp in pawn.GetMenstruationComps())
|
DefaultIfEmpty(HediffComp_Menstruation.EstrusLevel.None).
|
||||||
{
|
Max();
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool HasIUD(this Pawn pawn)
|
public static bool HasIUD(this Pawn pawn)
|
||||||
|
|
Loading…
Reference in a new issue