Files
tbd-station-14/Content.Server/Explosion/Components/TriggerOnMobstateChangeComponent.cs
Jezithyr eeb5b17b34 Mobstate Refactor (#13389)
Refactors mobstate and moves mob health thresholds to their own component

Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
2023-01-13 16:57:10 -08:00

25 lines
658 B
C#

using Content.Shared.Mobs;
namespace Content.Server.Explosion.Components;
/// <summary>
/// Use where you want something to trigger on mobstate change
/// </summary>
[RegisterComponent]
public sealed class TriggerOnMobstateChangeComponent : Component
{
/// <summary>
/// What state should trigger this?
/// </summary>
[ViewVariables]
[DataField("mobState", required: true)]
public MobState MobState = MobState.Alive;
/// <summary>
/// If true, prevents suicide attempts for the trigger to prevent cheese.
/// </summary>
[ViewVariables]
[DataField("preventSuicide")]
public bool PreventSuicide = false;
}