23 lines
693 B
C#
23 lines
693 B
C#
using Content.Server.Damage.Components;
|
|
using Content.Shared.Damage;
|
|
using Content.Shared.Throwing;
|
|
|
|
namespace Content.Server.Damage.Systems
|
|
{
|
|
public sealed class DamageOnLandSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<DamageOnLandComponent, LandEvent>(DamageOnLand);
|
|
}
|
|
|
|
private void DamageOnLand(EntityUid uid, DamageOnLandComponent component, LandEvent args)
|
|
{
|
|
_damageableSystem.TryChangeDamage(uid, component.Damage, component.IgnoreResistances);
|
|
}
|
|
}
|
|
}
|