Little refactor of GetMenstruationComp(pregnancy) again

This commit is contained in:
lutepickle 2022-07-12 14:46:39 -07:00
parent 6143fb41fb
commit 35b875980a

View file

@ -55,8 +55,7 @@ namespace RJW_Menstruation
public static HediffComp_Menstruation GetMenstruationComp(this Hediff_BasePregnancy pregnancy)
{
if (pregnancy == null) return null;
else return pregnancy.pawn.GetMenstruationComps().FirstOrDefault(comp => comp.Pregnancy == pregnancy);
return pregnancy?.pawn.GetMenstruationComps().FirstOrDefault(comp => comp.Pregnancy == pregnancy);
}
public static HediffComp_Anus GetAnusComp(this Pawn pawn)