2022-11-15 17:09:27 +13:00
|
|
|
using Content.Shared.Radio;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Radio.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This component is required to receive radio message events.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
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>
|
|
|
|
|
[DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
|
|
|
|
|
public HashSet<string> 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>
|
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public bool ReceiveAllChannels;
|
|
|
|
|
|
2023-04-02 19:56:07 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// If this radio can hear all messages on all maps
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("globalReceive")]
|
|
|
|
|
public bool GlobalReceive = false;
|
2022-11-15 17:09:27 +13:00
|
|
|
}
|