Types.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. namespace Content.Shared.Chat.V2;
  2. /// <summary>
  3. /// The types of messages that can be sent, validated and processed via user input that are covered by Chat V2.
  4. /// </summary>
  5. public enum MessageType : byte
  6. {
  7. #region Player-sendable types
  8. /// <summary>
  9. /// Chat for announcements like CentCom telling you to stop sending them memes.
  10. /// </summary>
  11. Announcement,
  12. /// <summary>
  13. /// Chat that ghosts use to complain about being gibbed.
  14. /// </summary>
  15. DeadChat,
  16. /// <summary>
  17. /// Chat that mimes use to evade their vow.
  18. /// </summary>
  19. Emote,
  20. /// <summary>
  21. /// Chat that players use to make lame jokes to people nearby.
  22. /// </summary>
  23. Local,
  24. /// <summary>
  25. /// Chat that players use to complain about shitsec/admins/antags/balance/etc.
  26. /// </summary>
  27. Looc,
  28. /// <summary>
  29. /// Chat that players use to say "HELP MAINT", or plead to call the shuttle because a beaker spilled.
  30. /// </summary>
  31. /// <remarks>This does not tell you what radio channel has been chatted on!</remarks>
  32. Radio,
  33. /// <summary>
  34. /// Chat that is used exclusively by syndie tots to collaborate on whatever tots do.
  35. /// </summary>
  36. Whisper,
  37. #endregion
  38. #region Non-player-sendable types
  39. /// <summary>
  40. /// Chat that is sent to exactly one player; almost exclusively used for admemes and prayer responses.
  41. /// </summary>
  42. Subtle,
  43. /// <summary>
  44. /// Chat that is sent by automata, like when a vending machine thanks you for your unwise purchases.
  45. /// </summary>
  46. Background,
  47. #endregion
  48. }
  49. /// <summary>
  50. /// Defines a chat event that can be stored in a chat repository.
  51. /// </summary>
  52. public interface IChatEvent
  53. {
  54. /// <summary>
  55. /// The sender of the chat message.
  56. /// </summary>
  57. public EntityUid Sender
  58. {
  59. get;
  60. }
  61. /// <summary>
  62. /// The ID of the message. This is overwritten when saved into a repository.
  63. /// </summary>
  64. public uint Id
  65. {
  66. get;
  67. set;
  68. }
  69. /// <summary>
  70. /// The sent message.
  71. /// </summary>
  72. public string Message
  73. {
  74. get;
  75. set;
  76. }
  77. /// <summary>
  78. /// The type of sent message.
  79. /// </summary>
  80. public MessageType Type
  81. {
  82. get;
  83. }
  84. }