Refactor IsBreedingSeason to be a bit cleaner

This commit is contained in:
lutepickle 2022-06-02 14:21:43 -07:00
parent e09c4aeb97
commit 7f84480bee

View file

@ -1093,23 +1093,18 @@ namespace RJW_Menstruation
switch (GenLocalDate.Season(map)) switch (GenLocalDate.Season(map))
{ {
case Season.Spring: case Season.Spring:
if ((Props.breedingSeason & SeasonalBreed.Spring) != 0) return true; return (Props.breedingSeason & SeasonalBreed.Spring) != 0;
break;
case Season.Summer: case Season.Summer:
case Season.PermanentSummer: case Season.PermanentSummer:
if ((Props.breedingSeason & SeasonalBreed.Summer) != 0) return true; return (Props.breedingSeason & SeasonalBreed.Summer) != 0;
break;
case Season.Fall: case Season.Fall:
if ((Props.breedingSeason & SeasonalBreed.Fall) != 0) return true; return (Props.breedingSeason & SeasonalBreed.Fall) != 0;
break;
case Season.Winter: case Season.Winter:
case Season.PermanentWinter: case Season.PermanentWinter:
if ((Props.breedingSeason & SeasonalBreed.Winter) != 0) return true; return (Props.breedingSeason & SeasonalBreed.Winter) != 0;
break;
default: default:
return false; return false;
} }
return false;
} }
protected Pawn Fertilize() protected Pawn Fertilize()