rjw_menstruation/1.5/source/RJW_Menstruation/RJW_Menstruation/IngestionOutcomeDoers.cs

18 lines
705 B
C#
Raw Normal View History

2024-03-13 23:29:56 +00:00
using RimWorld;
using Verse;
namespace RJW_Menstruation
{
public class IngestionOutcomeDoer_GiveHediff_StackCount : IngestionOutcomeDoer_GiveHediff
{
2024-03-14 00:15:13 +00:00
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested, int ingestedcount)
2024-03-13 23:29:56 +00:00
{
Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn);
float effect = ((!(severity > 0f)) ? hediffDef.initialSeverity : severity) * ingested.stackCount;
AddictionUtility.ModifyChemicalEffectForToleranceAndBodySize_NewTemp(pawn, toleranceChemical, ref effect, multiplyByGeneToleranceFactors);
2024-03-13 23:29:56 +00:00
hediff.Severity = effect;
pawn.health.AddHediff(hediff);
}
}
}