Files
tbd-station-14/Content.Shared/Interaction/Events/SuicideEvent.cs
wrexbe 089e40a061 Convert suicide to ecs (#8091)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-05-12 22:05:16 +10:00

40 lines
1006 B
C#

namespace Content.Shared.Interaction.Events
{
/// <summary>
/// Raised Directed at an entity to check whether they will handle the suicide.
/// </summary>
public sealed class SuicideEvent : EntityEventArgs
{
public SuicideEvent(EntityUid victim)
{
Victim = victim;
}
public void SetHandled(SuicideKind kind)
{
if (Handled) throw new InvalidOperationException("Suicide was already handled");
Kind = kind;
}
public SuicideKind? Kind { get; private set; }
public EntityUid Victim { get; private set; }
public bool Handled => Kind != null;
}
public enum SuicideKind
{
Special, //Doesn't damage the mob, used for "weird" suicides like gibbing
//Damage type suicides
Blunt,
Slash,
Piercing,
Heat,
Shock,
Cold,
Poison,
Radiation,
Asphyxiation,
Bloodloss
}
}