scale reagent damage when under metabolism rate (#11578)
This commit is contained in:
@@ -172,7 +172,7 @@ namespace Content.Server.Body.Systems
|
||||
|
||||
var actualEntity = bodyEntityUid != null ? bodyEntityUid.Value : solutionEntityUid.Value;
|
||||
var args = new ReagentEffectArgs(actualEntity, (meta).Owner, solution, proto, mostToRemove,
|
||||
EntityManager, null);
|
||||
EntityManager, null, entry);
|
||||
|
||||
// do all effects, if conditions apply
|
||||
foreach (var effect in entry.Effects)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user