SprayPainterEvents.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using Content.Shared.DoAfter;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.SprayPainter;
  4. [Serializable, NetSerializable]
  5. public enum SprayPainterUiKey
  6. {
  7. Key,
  8. }
  9. [Serializable, NetSerializable]
  10. public sealed class SprayPainterSpritePickedMessage : BoundUserInterfaceMessage
  11. {
  12. public readonly int Index;
  13. public SprayPainterSpritePickedMessage(int index)
  14. {
  15. Index = index;
  16. }
  17. }
  18. [Serializable, NetSerializable]
  19. public sealed class SprayPainterColorPickedMessage : BoundUserInterfaceMessage
  20. {
  21. public readonly string? Key;
  22. public SprayPainterColorPickedMessage(string? key)
  23. {
  24. Key = key;
  25. }
  26. }
  27. [Serializable, NetSerializable]
  28. public sealed partial class SprayPainterDoorDoAfterEvent : DoAfterEvent
  29. {
  30. /// <summary>
  31. /// Base RSI path to set for the door sprite.
  32. /// </summary>
  33. [DataField]
  34. public string Sprite;
  35. /// <summary>
  36. /// Department id to set for the door, if the style has one.
  37. /// </summary>
  38. [DataField]
  39. public string? Department;
  40. public SprayPainterDoorDoAfterEvent(string sprite, string? department)
  41. {
  42. Sprite = sprite;
  43. Department = department;
  44. }
  45. public override DoAfterEvent Clone() => this;
  46. }
  47. [Serializable, NetSerializable]
  48. public sealed partial class SprayPainterPipeDoAfterEvent : DoAfterEvent
  49. {
  50. /// <summary>
  51. /// Color of the pipe to set.
  52. /// </summary>
  53. [DataField]
  54. public Color Color;
  55. public SprayPainterPipeDoAfterEvent(Color color)
  56. {
  57. Color = color;
  58. }
  59. public override DoAfterEvent Clone() => this;
  60. }