37 lines
1.3 KiB
C#
37 lines
1.3 KiB
C#
using Content.Shared.Chat;
|
|
using Content.Shared.Radio;
|
|
|
|
namespace Content.Server.Radio;
|
|
|
|
[ByRefEvent]
|
|
public readonly record struct RadioReceiveEvent(string Message, EntityUid MessageSource, RadioChannelPrototype Channel, EntityUid RadioSource, MsgChatMessage ChatMsg);
|
|
|
|
/// <summary>
|
|
/// Event raised on the parent entity of a headset radio when a radio message is received
|
|
/// </summary>
|
|
[ByRefEvent]
|
|
public readonly record struct HeadsetRadioReceiveRelayEvent(RadioReceiveEvent RelayedEvent);
|
|
|
|
/// <summary>
|
|
/// Use this event to cancel sending message per receiver
|
|
/// </summary>
|
|
[ByRefEvent]
|
|
public record struct RadioReceiveAttemptEvent(RadioChannelPrototype Channel, EntityUid RadioSource, EntityUid RadioReceiver)
|
|
{
|
|
public readonly RadioChannelPrototype Channel = Channel;
|
|
public readonly EntityUid RadioSource = RadioSource;
|
|
public readonly EntityUid RadioReceiver = RadioReceiver;
|
|
public bool Cancelled = false;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Use this event to cancel sending message to every receiver
|
|
/// </summary>
|
|
[ByRefEvent]
|
|
public record struct RadioSendAttemptEvent(RadioChannelPrototype Channel, EntityUid RadioSource)
|
|
{
|
|
public readonly RadioChannelPrototype Channel = Channel;
|
|
public readonly EntityUid RadioSource = RadioSource;
|
|
public bool Cancelled = false;
|
|
}
|