mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Let CalculatedImpactChance return early to avoid unnecessarily hitting OvulationChance
This commit is contained in:
parent
50310988ca
commit
836d3d69c8
1 changed files with 1 additions and 0 deletions
|
@ -322,6 +322,7 @@ namespace RJW_Menstruation
|
|||
// Implant factor will be based solely on pawn age, plus any rollover from ovulation chance
|
||||
float factor = 1.0f;
|
||||
StatDefOf.Fertility.GetStatPart<StatPart_FertilityByGenderAge>()?.TransformValue(StatRequest.For(Pawn), ref factor);
|
||||
if (factor <= 0.0f) return 0.0f;
|
||||
if (OvulationChance > 1.0f) factor *= OvulationChance;
|
||||
return Props.baseImplantationChanceFactor * FertilityModifier * factor;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue