1
0

MobState.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using Content.Shared.Mobs.Components;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.Mobs;
  4. /// <summary>
  5. /// Defines what state an <see cref="Robust.Shared.GameObjects.EntityUid"/> is in.
  6. ///
  7. /// Ordered from most alive to least alive.
  8. /// To enumerate them in this way see
  9. /// <see cref="MobStateHelpers.AliveToDead"/>.
  10. /// </summary>
  11. [Serializable, NetSerializable]
  12. public enum MobState : byte
  13. {
  14. Invalid = 0,
  15. Alive = 1,
  16. Critical = 2,
  17. Dead = 3
  18. }
  19. /// <summary>
  20. /// Event that is raised whenever a MobState changes on an entity
  21. /// </summary>
  22. /// <param name="Target">The Entity whose MobState is changing</param>
  23. /// <param name="Component">The MobState Component owned by the Target entity</param>
  24. /// <param name="OldMobState">The previous MobState</param>
  25. /// <param name="NewMobState">The new MobState</param>
  26. /// <param name="Origin">The Entity that caused this state change</param>
  27. public record struct MobStateChangedEvent(EntityUid Target, MobStateComponent Component, MobState OldMobState,
  28. MobState NewMobState, EntityUid? Origin = null);
  29. public static class A
  30. {
  31. //^.^
  32. }
  33. //This is dumb and I hate it but I don't feel like refactoring this garbage
  34. [Serializable, NetSerializable]
  35. public enum MobStateVisuals : byte
  36. {
  37. State
  38. }