mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Encapsulate calculatingOvulationChance
This commit is contained in:
parent
924dc73024
commit
ff22e534d1
2 changed files with 3 additions and 2 deletions
|
@ -296,7 +296,8 @@ namespace RJW_Menstruation
|
|||
}
|
||||
|
||||
// I hate doing this, but it's the least bad option
|
||||
public bool calculatingOvulationChance = false;
|
||||
private bool calculatingOvulationChance = false;
|
||||
public bool CalculatingOvulationChance { get => calculatingOvulationChance; }
|
||||
|
||||
protected float CalcuatedOvulationChance()
|
||||
{
|
||||
|
|
|
@ -378,7 +378,7 @@ namespace RJW_Menstruation
|
|||
private static float GetFertilityStatOrOne(Thing thing, StatDef stat, bool applyPostProcess, int cacheStaleAfterTicks)
|
||||
{
|
||||
Pawn pawn = (Pawn)thing;
|
||||
if (pawn.GetMenstruationComps().Any(comp => comp.calculatingOvulationChance))
|
||||
if (pawn.GetMenstruationComps().Any(comp => comp.CalculatingOvulationChance))
|
||||
return 1.0f;
|
||||
else return thing.GetStatValue(stat, applyPostProcess, cacheStaleAfterTicks);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue