Files
tbd-station-14/Content.Shared/Damage/Systems/DamageProtectionBuffSystem.cs
slarticodefast 577f30fb13 Add haloperidol, potassium iodide (#27454)
* add haloperidol, potassium iodide

* review fixes

* review and tuning

* shader review

* use timespan and AutoPausedField
2024-08-03 03:12:08 +10:00

20 lines
594 B
C#

using Content.Shared.Damage.Components;
namespace Content.Shared.Damage.Systems;
public sealed class DamageProtectionBuffSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<DamageProtectionBuffComponent, DamageModifyEvent>(OnDamageModify);
}
private void OnDamageModify(EntityUid uid, DamageProtectionBuffComponent component, DamageModifyEvent args)
{
foreach (var modifier in component.Modifiers.Values)
args.Damage = DamageSpecifier.ApplyModifierSet(args.Damage, modifier);
}
}