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))
{
case Season.Spring:
if ((Props.breedingSeason & SeasonalBreed.Spring) != 0) return true;
break;
return (Props.breedingSeason & SeasonalBreed.Spring) != 0;
case Season.Summer:
case Season.PermanentSummer:
if ((Props.breedingSeason & SeasonalBreed.Summer) != 0) return true;
break;
return (Props.breedingSeason & SeasonalBreed.Summer) != 0;
case Season.Fall:
if ((Props.breedingSeason & SeasonalBreed.Fall) != 0) return true;
break;
return (Props.breedingSeason & SeasonalBreed.Fall) != 0;
case Season.Winter:
case Season.PermanentWinter:
if ((Props.breedingSeason & SeasonalBreed.Winter) != 0) return true;
break;
return (Props.breedingSeason & SeasonalBreed.Winter) != 0;
default:
return false;
}
return false;
}
protected Pawn Fertilize()