scale reagent damage when under metabolism rate (#11578)

This commit is contained in:
Rane
2022-10-09 15:40:49 -04:00
committed by GitHub
parent bd86557f61
commit ee10581e88
6 changed files with 8 additions and 5 deletions

View File

@@ -34,6 +34,8 @@ namespace Content.Server.Chemistry.ReagentEffects
public override void Effect(ReagentEffectArgs args)
{
var scale = ScaleByQuantity ? args.Quantity : FixedPoint2.New(1);
if (args.MetabolismEffects != null)
scale *= (args.Quantity / args.MetabolismEffects.MetabolismRate);
EntitySystem.Get<DamageableSystem>().TryChangeDamage(args.SolutionEntity, Damage * scale, IgnoreResistances);
}
}