Only apply active genes

This commit is contained in:
lutepickle 2024-04-13 05:39:08 -07:00
parent be05766fba
commit 3bdf881533

View file

@ -658,7 +658,7 @@ namespace RJW_Menstruation
opcache = -1; opcache = -1;
if (Pawn.genes == null || !ModsConfig.BiotechActive) return; if (Pawn.genes == null || !ModsConfig.BiotechActive) return;
foreach (MenstruationModExtension extension in Pawn.genes.GenesListForReading.Select(gene => gene.def.GetModExtension<MenstruationModExtension>()).Where(ext => ext != null)) foreach (MenstruationModExtension extension in Pawn.genes.GenesListForReading.Where(gene => gene.Active).Select(gene => gene.def.GetModExtension<MenstruationModExtension>()).Where(ext => ext != null))
{ {
eggLifeSpanTicks = (int)(eggLifeSpanTicks * extension.eggLifeTimeFactor); eggLifeSpanTicks = (int)(eggLifeSpanTicks * extension.eggLifeTimeFactor);
if (extension.alwaysEstrus) estrusLevel = EstrusLevel.Visible; if (extension.alwaysEstrus) estrusLevel = EstrusLevel.Visible;