2023-01-13 16:57:10 -08:00
|
|
|
|
using Content.Shared.Mobs;
|
2022-11-20 01:49:37 -05:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Explosion.Components;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Use where you want something to trigger on mobstate change
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class TriggerOnMobstateChangeComponent : Component
|
2022-11-20 01:49:37 -05:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// What state should trigger this?
|
|
|
|
|
|
/// </summary>
|
2022-11-20 21:51:44 -05:00
|
|
|
|
[ViewVariables]
|
2022-11-20 01:49:37 -05:00
|
|
|
|
[DataField("mobState", required: true)]
|
2023-07-16 04:59:46 +02:00
|
|
|
|
public List<MobState> MobState = new();
|
2022-11-20 21:51:44 -05:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// If true, prevents suicide attempts for the trigger to prevent cheese.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
|
[DataField("preventSuicide")]
|
|
|
|
|
|
public bool PreventSuicide = false;
|
2022-11-20 01:49:37 -05:00
|
|
|
|
}
|