SharedMech.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using Content.Shared.Actions;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.Mech;
  4. [Serializable, NetSerializable]
  5. public enum MechVisuals : byte
  6. {
  7. Open, //whether or not it's open and has a rider
  8. Broken //if it broke and no longer works.
  9. }
  10. [Serializable, NetSerializable]
  11. public enum MechAssemblyVisuals : byte
  12. {
  13. State
  14. }
  15. [Serializable, NetSerializable]
  16. public enum MechVisualLayers : byte
  17. {
  18. Base
  19. }
  20. /// <summary>
  21. /// Event raised on equipment when it is inserted into a mech
  22. /// </summary>
  23. [ByRefEvent]
  24. public readonly record struct MechEquipmentInsertedEvent(EntityUid Mech)
  25. {
  26. public readonly EntityUid Mech = Mech;
  27. }
  28. /// <summary>
  29. /// Event raised on equipment when it is removed from a mech
  30. /// </summary>
  31. [ByRefEvent]
  32. public readonly record struct MechEquipmentRemovedEvent(EntityUid Mech)
  33. {
  34. public readonly EntityUid Mech = Mech;
  35. }
  36. /// <summary>
  37. /// Raised on the mech equipment before it is going to be removed.
  38. /// </summary>
  39. [ByRefEvent]
  40. public record struct AttemptRemoveMechEquipmentEvent()
  41. {
  42. public bool Cancelled = false;
  43. }
  44. public sealed partial class MechToggleEquipmentEvent : InstantActionEvent
  45. {
  46. }
  47. public sealed partial class MechOpenUiEvent : InstantActionEvent
  48. {
  49. }
  50. public sealed partial class MechEjectPilotEvent : InstantActionEvent
  51. {
  52. }