RadioEvent.cs 1.0 KB

123456789101112131415161718192021222324252627282930
  1. using Content.Shared.Chat;
  2. using Content.Shared.Radio;
  3. namespace Content.Server.Radio;
  4. [ByRefEvent]
  5. public readonly record struct RadioReceiveEvent(string Message, EntityUid MessageSource, RadioChannelPrototype Channel, EntityUid RadioSource, MsgChatMessage ChatMsg);
  6. /// <summary>
  7. /// Use this event to cancel sending message per receiver
  8. /// </summary>
  9. [ByRefEvent]
  10. public record struct RadioReceiveAttemptEvent(RadioChannelPrototype Channel, EntityUid RadioSource, EntityUid RadioReceiver)
  11. {
  12. public readonly RadioChannelPrototype Channel = Channel;
  13. public readonly EntityUid RadioSource = RadioSource;
  14. public readonly EntityUid RadioReceiver = RadioReceiver;
  15. public bool Cancelled = false;
  16. }
  17. /// <summary>
  18. /// Use this event to cancel sending message to every receiver
  19. /// </summary>
  20. [ByRefEvent]
  21. public record struct RadioSendAttemptEvent(RadioChannelPrototype Channel, EntityUid RadioSource)
  22. {
  23. public readonly RadioChannelPrototype Channel = Channel;
  24. public readonly EntityUid RadioSource = RadioSource;
  25. public bool Cancelled = false;
  26. }