24 lines
1.0 KiB
C#
24 lines
1.0 KiB
C#
using Content.Shared.Radio;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
|
|
|
|
namespace Content.Server.Radio.Components;
|
|
/// <summary>
|
|
/// This component is currently used for providing access to channels for "HeadsetComponent"s.
|
|
/// It should be used for intercoms and other radios in future.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
public sealed class EncryptionKeyComponent : Component
|
|
{
|
|
[DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
|
|
public HashSet<string> Channels = new();
|
|
|
|
|
|
/// <summary>
|
|
/// This variable defines what channel will be used with using ":h" (department channel prefix).
|
|
/// Headset read DefaultChannel of first encryption key installed.
|
|
/// </summary>
|
|
[DataField("defaultChannel", customTypeSerializer: typeof(PrototypeIdSerializer<RadioChannelPrototype>))]
|
|
public readonly string? DefaultChannel;
|
|
}
|