mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Slight refactor of GetFertileMenstruationComp
This commit is contained in:
parent
931b974bf9
commit
ea7b8e03ee
1 changed files with 1 additions and 3 deletions
|
@ -41,9 +41,7 @@ namespace RJW_Menstruation
|
|||
public static HediffComp_Menstruation GetFertileMenstruationComp(this Pawn pawn)
|
||||
{
|
||||
List<HediffComp_Menstruation> comps = pawn.GetMenstruationComps().ToList();
|
||||
HediffComp_Menstruation comp = comps.Where(c => c.IsDangerDay).RandomElementWithFallback();
|
||||
if (comp == null) return comps.RandomElementWithFallback();
|
||||
else return comp;
|
||||
return comps.Where(c => c.IsDangerDay).RandomElementWithFallback() ?? comps.RandomElementWithFallback();
|
||||
}
|
||||
|
||||
public static HediffComp_Menstruation GetMenstruationComp(this Hediff hediff)
|
||||
|
|
Loading…
Reference in a new issue