2025-09-12 01:26:47 +02:00
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
using Robust.Shared.Prototypes;
|
2022-11-15 17:09:27 +13:00
|
|
|
|
2025-09-12 01:26:47 +02:00
|
|
|
namespace Content.Shared.Radio.Components;
|
2022-11-15 17:09:27 +13:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This component is required to receive radio message events.
|
|
|
|
|
/// </summary>
|
2025-09-12 01:26:47 +02:00
|
|
|
[RegisterComponent, NetworkedComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class ActiveRadioComponent : Component
|
2022-11-15 17:09:27 +13:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The channels that this radio is listening on.
|
|
|
|
|
/// </summary>
|
2025-09-12 01:26:47 +02:00
|
|
|
[DataField]
|
|
|
|
|
public HashSet<ProtoId<RadioChannelPrototype>> Channels = new();
|
2023-04-02 19:56:07 -04:00
|
|
|
|
2023-12-04 18:13:45 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// A toggle for globally receiving all radio channels.
|
|
|
|
|
/// Overrides <see cref="Channels"/>
|
|
|
|
|
/// </summary>
|
2025-09-12 01:26:47 +02:00
|
|
|
[DataField]
|
2023-12-04 18:13:45 -05:00
|
|
|
public bool ReceiveAllChannels;
|
|
|
|
|
|
2023-04-02 19:56:07 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// If this radio can hear all messages on all maps
|
|
|
|
|
/// </summary>
|
2025-09-12 01:26:47 +02:00
|
|
|
[DataField]
|
2023-04-02 19:56:07 -04:00
|
|
|
public bool GlobalReceive = false;
|
2022-11-15 17:09:27 +13:00
|
|
|
}
|