Change the ingestion effect to use the new ingestedcount

This commit is contained in:
lutepickle 2024-04-17 18:46:51 -07:00
parent 5da2b69fd5
commit 88520cb8eb

View file

@ -8,7 +8,7 @@ namespace RJW_Menstruation
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested, int ingestedcount) protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested, int ingestedcount)
{ {
Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn); Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn);
float effect = ((!(severity > 0f)) ? hediffDef.initialSeverity : severity) * ingested.stackCount; float effect = ((!(severity > 0f)) ? hediffDef.initialSeverity : severity) * ingestedcount;
AddictionUtility.ModifyChemicalEffectForToleranceAndBodySize_NewTemp(pawn, toleranceChemical, ref effect, multiplyByGeneToleranceFactors); AddictionUtility.ModifyChemicalEffectForToleranceAndBodySize_NewTemp(pawn, toleranceChemical, ref effect, multiplyByGeneToleranceFactors);
hediff.Severity = effect; hediff.Severity = effect;
pawn.health.AddHediff(hediff); pawn.health.AddHediff(hediff);