Files
crystall-punk-14/Content.Server/Radio/Components/RadioSpeakerComponent.cs

28 lines
889 B
C#
Raw Permalink Normal View History

2022-11-15 17:09:27 +13:00
using Content.Server.Radio.EntitySystems;
2023-02-19 06:27:56 +13:00
using Content.Shared.Chat;
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>
/// Listens for radio messages and relays them to local chat.
/// </summary>
[RegisterComponent]
[Access(typeof(RadioDeviceSystem))]
public sealed partial class RadioSpeakerComponent : Component
2022-11-15 17:09:27 +13:00
{
/// <summary>
/// Whether or not interacting with this entity
/// toggles it on or off.
/// </summary>
[DataField("toggleOnInteract")]
public bool ToggleOnInteract = true;
2022-11-15 17:09:27 +13:00
[DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
2023-02-19 06:27:56 +13:00
public HashSet<string> Channels = new () { SharedChatSystem.CommonChannel };
2022-11-15 17:09:27 +13:00
[DataField("enabled")]
public bool Enabled;
}