* add haloperidol, potassium iodide * review fixes * review and tuning * add: translation * new mutations * translation string fix * holymelons are holy now * add: translation * rename holymelon * Tomato killers don't kill the server anymore. (#28173) * tomato killer auto death * fix * Update miscellaneous.yml --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
20 lines
594 B
C#
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);
|
|
}
|
|
}
|