mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Compare commits
4 commits
28d77ed1fb
...
f8913d1ec5
Author | SHA1 | Date | |
---|---|---|---|
|
f8913d1ec5 | ||
|
f40eed6317 | ||
|
1cce07d312 | ||
|
4c788906c7 |
3 changed files with 4 additions and 7 deletions
Binary file not shown.
|
@ -86,9 +86,8 @@
|
|||
</stages>
|
||||
<comps>
|
||||
<li Class="RJW_Menstruation.CompProperties_Pheromones">
|
||||
<daysToMaxSeverity>0.5</daysToMaxSeverity> <!-- The amount of time spent near someone in estrus for full effect -->
|
||||
<daysToMaxSeverity>0.25</daysToMaxSeverity> <!-- The amount of time spent near someone in estrus for full effect -->
|
||||
<range>6</range>
|
||||
<intensity>1</intensity>
|
||||
</li>
|
||||
</comps>
|
||||
</HediffDef>
|
||||
|
@ -139,7 +138,6 @@
|
|||
<label>weak</label>
|
||||
<statFactors>
|
||||
<SexFrequency>1.1</SexFrequency>
|
||||
<SexSatisfaction>1.0</SexSatisfaction>
|
||||
</statFactors>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
@ -13,7 +13,6 @@ namespace RJW_Menstruation
|
|||
{
|
||||
public float daysToMaxSeverity;
|
||||
public float range;
|
||||
public float intensity = 1.0f;
|
||||
|
||||
public CompProperties_Pheromones()
|
||||
{
|
||||
|
@ -25,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 float EmitRatio => (float)emitInterval / GenDate.TicksPerDay;
|
||||
|
||||
public override void CompPostTick(ref float severityAdjustment)
|
||||
{
|
||||
|
@ -83,12 +82,12 @@ namespace RJW_Menstruation
|
|||
|
||||
protected void ApplyEffectToPawn(Pawn target)
|
||||
{
|
||||
float intensity = Props.intensity * GetEffectOnPawn(target);
|
||||
float intensity = GetEffectOnPawn(target);
|
||||
if (intensity <= 0.0f) return;
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue