2021-10-18 16:24:37 -07:00
|
|
|
|
using Content.Shared.Damage;
|
|
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Armor
|
|
|
|
|
|
{
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class ArmorSystem : EntitySystem
|
2021-10-18 16:24:37 -07:00
|
|
|
|
{
|
|
|
|
|
|
public override void Initialize()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Initialize();
|
|
|
|
|
|
|
|
|
|
|
|
SubscribeLocalEvent<ArmorComponent, DamageModifyEvent>(OnDamageModify);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnDamageModify(EntityUid uid, ArmorComponent component, DamageModifyEvent args)
|
|
|
|
|
|
{
|
|
|
|
|
|
args.Damage = DamageSpecifier.ApplyModifierSet(args.Damage, component.Modifiers);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|