using Content.Shared.Damage.Components;
using Content.Shared.Damage.Prototypes;
using Content.Shared.Suicide;
using Robust.Shared.Prototypes;
namespace Content.Shared.EntityEffects.Effects.Damage;
///
/// Applies damage through the suicide system to reach the highest mob threshold.
/// Has no effect on entities without mob thresholds.
///
///
public sealed partial class LethalDamageEntityEffectSystem : EntityEffectSystem
{
[Dependency] private SharedSuicideSystem _suicide = default!;
protected override void Effect(Entity entity, ref EntityEffectEvent args)
{
_suicide.ApplyLethalDamage(entity, args.Effect.DamageType);
}
}
///
public sealed partial class LethalDamage : EntityEffectBase
{
///
/// Damage type used to deal the lethal damage.
///
[DataField(required: true)]
public ProtoId DamageType;
}