1
0

TriggerOnMobstateChangeComponent.cs 663 B

123456789101112131415161718192021222324
  1. using Content.Shared.Mobs;
  2. namespace Content.Server.Explosion.Components;
  3. /// <summary>
  4. /// Use where you want something to trigger on mobstate change
  5. /// </summary>
  6. [RegisterComponent]
  7. public sealed partial class TriggerOnMobstateChangeComponent : Component
  8. {
  9. /// <summary>
  10. /// What state should trigger this?
  11. /// </summary>
  12. [ViewVariables]
  13. [DataField("mobState", required: true)]
  14. public List<MobState> MobState = new();
  15. /// <summary>
  16. /// If true, prevents suicide attempts for the trigger to prevent cheese.
  17. /// </summary>
  18. [ViewVariables]
  19. [DataField("preventSuicide")]
  20. public bool PreventSuicide = false;
  21. }