mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Account for simulations per hour when increasing sex need in AfterSimulator
This commit is contained in:
parent
b19bbb82a8
commit
933c3cf626
4 changed files with 5 additions and 3 deletions
Binary file not shown.
|
@ -1299,7 +1299,8 @@ namespace RJW_Menstruation
|
|||
if (EggHealth < 1f)
|
||||
{
|
||||
if (sexNeed == null) sexNeed = Pawn.needs.TryGetNeed(VariousDefOf.SexNeed);
|
||||
if (sexNeed?.CurLevel < 0.5) sexNeed.CurLevel += 0.01f / Math.Max(1, Pawn.GetMenstruationComps().Count());
|
||||
if (sexNeed == null) return;
|
||||
if (sexNeed.CurLevel < 0.5f) sexNeed.CurLevel += 0.01f / (SimulationsPerHour * Math.Max(1, Pawn.GetMenstruationComps().Count()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace RJW_Menstruation
|
|||
{
|
||||
public CompProperties_Pheromones Props => (CompProperties_Pheromones)props;
|
||||
public const int emitInterval = GenTicks.TickRareInterval;
|
||||
public float EmitRatio => (float)emitInterval / GenDate.TicksPerDay;
|
||||
public const float emitRatio = (float)emitInterval / GenDate.TicksPerDay;
|
||||
|
||||
public override void CompPostTick(ref float severityAdjustment)
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ namespace RJW_Menstruation
|
|||
Hediff pheromones = target.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_AffectedByPheromones);
|
||||
float decay = VariousDefOf.Hediff_AffectedByPheromones.CompProps<HediffCompProperties_SeverityPerDay>().severityPerDay;
|
||||
float raiseSeverityPerDay = intensity / Props.daysToMaxSeverity - decay; // Desired increase plus enough to overcome pheromone decay
|
||||
float amountToApply = EmitRatio * raiseSeverityPerDay;
|
||||
float amountToApply = emitRatio * raiseSeverityPerDay;
|
||||
if (pheromones != null)
|
||||
pheromones.Severity += amountToApply;
|
||||
else
|
||||
|
|
|
@ -4,6 +4,7 @@ Version 1.0.9.1
|
|||
- New pheromone system: Pawns in visible estrus will increase the sex drive of nearby males. Can be disabled in the options.
|
||||
- Using the egg restoration biosculptor cycle will give a small mood buff.
|
||||
- Periodic ovulators that don't bleed will properly enter anestrus after their luteal stage.
|
||||
- Climacteric/menopausal pawns will have their sex need slow properly when the womb's tick rate is non-default.
|
||||
|
||||
Version 1.0.9.0
|
||||
- Fix errors when opening the womb dialog of some low fertility pawns.
|
||||
|
|
Loading…
Reference in a new issue