Compare commits

..

No commits in common. "ff22e534d12a95e065305887598dfebd8d2e3840" and "f8913d1ec5387c51098377aef3d81d7b42d54ad3" have entirely different histories.

2 changed files with 3 additions and 4 deletions

View file

@ -296,8 +296,7 @@ namespace RJW_Menstruation
} }
// I hate doing this, but it's the least bad option // I hate doing this, but it's the least bad option
private bool calculatingOvulationChance = false; public bool calculatingOvulationChance = false;
public bool CalculatingOvulationChance { get => calculatingOvulationChance; }
protected float CalcuatedOvulationChance() protected float CalcuatedOvulationChance()
{ {
@ -1597,7 +1596,7 @@ namespace RJW_Menstruation
hediff.Severity = crampPain * Rand.Range(0.9f, 1.1f); hediff.Severity = crampPain * Rand.Range(0.9f, 1.1f);
HediffCompProperties_SeverityPerDay Prop = (HediffCompProperties_SeverityPerDay)hediff.TryGetComp<HediffComp_SeverityPerDay>().props; HediffCompProperties_SeverityPerDay Prop = (HediffCompProperties_SeverityPerDay)hediff.TryGetComp<HediffComp_SeverityPerDay>().props;
Prop.severityPerDay = -hediff.Severity / (currentIntervalTicks / GenDate.TicksPerDay) * Configurations.CycleAcceleration; Prop.severityPerDay = -hediff.Severity / (currentIntervalTicks / GenDate.TicksPerDay) * Configurations.CycleAcceleration;
Pawn.health.AddHediff(hediff, parent.Part); Pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(Pawn));
} }
protected virtual void FollicularAction() protected virtual void FollicularAction()

View file

@ -378,7 +378,7 @@ namespace RJW_Menstruation
private static float GetFertilityStatOrOne(Thing thing, StatDef stat, bool applyPostProcess, int cacheStaleAfterTicks) private static float GetFertilityStatOrOne(Thing thing, StatDef stat, bool applyPostProcess, int cacheStaleAfterTicks)
{ {
Pawn pawn = (Pawn)thing; Pawn pawn = (Pawn)thing;
if (pawn.GetMenstruationComps().Any(comp => comp.CalculatingOvulationChance)) if (pawn.GetMenstruationComps().Any(comp => comp.calculatingOvulationChance))
return 1.0f; return 1.0f;
else return thing.GetStatValue(stat, applyPostProcess, cacheStaleAfterTicks); else return thing.GetStatValue(stat, applyPostProcess, cacheStaleAfterTicks);
} }