mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Optimize Notify_UpdatedGenes
This commit is contained in:
parent
89ecbcd5aa
commit
db42fa0234
1 changed files with 11 additions and 8 deletions
|
@ -699,17 +699,20 @@ namespace RJW_Menstruation
|
|||
|
||||
if (Pawn.genes == null || !ModsConfig.BiotechActive) return;
|
||||
|
||||
if (Pawn.genes.HasGene(VariousDefOf.ShortEggLifetime)) eggLifeSpanTicks = eggLifeSpanTicks * 3 / 4;
|
||||
else if (Pawn.genes.HasGene(VariousDefOf.DoubleEggLifetime)) eggLifeSpanTicks *= 2;
|
||||
else if (Pawn.genes.HasGene(VariousDefOf.QuadEggLifetime)) eggLifeSpanTicks *= 4;
|
||||
foreach (GeneDef geneDef in Pawn.genes.GenesListForReading.Select(gene => gene.def))
|
||||
{
|
||||
if (geneDef == VariousDefOf.ShortEggLifetime) eggLifeSpanTicks = eggLifeSpanTicks * 3 / 4;
|
||||
else if (geneDef == VariousDefOf.DoubleEggLifetime) eggLifeSpanTicks *= 2;
|
||||
else if (geneDef == VariousDefOf.QuadEggLifetime) eggLifeSpanTicks *= 4;
|
||||
|
||||
if (Pawn.genes.HasGene(VariousDefOf.NeverEstrus)) estrusLevel = EstrusLevel.None;
|
||||
else if (Pawn.genes.HasGene(VariousDefOf.FullEstrus)) estrusLevel = EstrusLevel.Visible;
|
||||
else if (geneDef == VariousDefOf.NeverEstrus) estrusLevel = EstrusLevel.None;
|
||||
else if (geneDef == VariousDefOf.FullEstrus) estrusLevel = EstrusLevel.Visible;
|
||||
|
||||
if (Pawn.genes.HasGene(VariousDefOf.DoubleOvulation)) ovulationFactor = 2f;
|
||||
else if (Pawn.genes.HasGene(VariousDefOf.QuadOvulation)) ovulationFactor = 4f;
|
||||
else if (geneDef == VariousDefOf.DoubleOvulation) ovulationFactor = 2f;
|
||||
else if (geneDef == VariousDefOf.QuadOvulation) ovulationFactor = 4f;
|
||||
|
||||
noBleeding = Pawn.genes.HasGene(VariousDefOf.NoBleeding);
|
||||
else if (geneDef == VariousDefOf.NoBleeding) noBleeding = true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShouldSimulate()
|
||||
|
|
Loading…
Reference in a new issue