Little refactor in ShouldCycle

This commit is contained in:
lutepickle 2024-01-09 10:26:28 -08:00
parent 8e6c38045c
commit 8e9acaa8ca

View file

@ -397,11 +397,8 @@ namespace RJW_Menstruation
{
if (!Configurations.EnableAnimalCycle && pawn.IsAnimal()) return false;
if (pawn.RaceHasOviPregnancy()) return false;
if (ModsConfig.BiotechActive && pawn.genes != null)
{
foreach (GeneDef geneDef in pawn.genes.GenesListForReading.Select(gene => gene.def))
if (VariousDefOf.EggLayerGenes.Contains(geneDef)) return false;
}
if (ModsConfig.BiotechActive && pawn.genes != null &&
pawn.genes.GenesListForReading.Select(gene => gene.def).Intersect(VariousDefOf.EggLayerGenes).Any()) return false;
return true;
}