Pass the menstruation comp into Cum.DiminishNatural for RJW Muscle Injury

This commit is contained in:
lutepickle 2022-09-26 07:51:55 -07:00
parent 85bbc95367
commit 8b7b694ad3
3 changed files with 4 additions and 3 deletions

Binary file not shown.

View File

@ -1,6 +1,7 @@
using RimWorld;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text;
using UnityEngine;
using Verse;
@ -201,9 +202,9 @@ namespace RJW_Menstruation
return false;
}
public float DismishNatural(float leakfactor, float antisperm = 0.0f)
public float DismishNatural(float leakfactor, HediffComp_Menstruation comp, float antisperm = 0.0f)
{
// comp is used for Hydrogen's RJW Muscle Injury
float totalleak = volume;
volume *= Math.Max(0, (1 - (Configurations.CumDecayRatio * (1 - DecayResist)) * leakfactor));
fertility *= Math.Max(0, 1 - (Configurations.CumFertilityDecayRatio * (1 - DecayResist) + antisperm));

View File

@ -898,7 +898,7 @@ namespace RJW_Menstruation
foreach (Cum cum in cums)
{
cum.CumEffects(Pawn);
float vd = cum.DismishNatural(leakfactor, antisperm);
float vd = cum.DismishNatural(leakfactor, this, antisperm);
cum.MakeThinner(Configurations.CycleAcceleration);
totalleak += AbsorbCum(vd, absorber);
string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn?.LabelShort ?? "Unknown", 1.ToString());