Files
tbd-station-14/Content.Server/Radio/Components/RadioSpeakerComponent.cs
2023-02-19 04:27:56 +11:00

21 lines
684 B
C#

using Content.Server.Radio.EntitySystems;
using Content.Shared.Chat;
using Content.Shared.Radio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
namespace Content.Server.Radio.Components;
/// <summary>
/// Listens for radio messages and relays them to local chat.
/// </summary>
[RegisterComponent]
[Access(typeof(RadioDeviceSystem))]
public sealed class RadioSpeakerComponent : Component
{
[DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
public HashSet<string> Channels = new () { SharedChatSystem.CommonChannel };
[DataField("enabled")]
public bool Enabled;
}