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;
|
2024-04-11 17:25:25 +00:00
|
|
|
|
AddictionUtility.ModifyChemicalEffectForToleranceAndBodySize_NewTemp(pawn, toleranceChemical, ref effect, multiplyByGeneToleranceFactors);
|
2024-03-13 23:29:56 +00:00
|
|
|
|
hediff.Severity = effect;
|
|
|
|
|
pawn.health.AddHediff(hediff);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|