Encryption Keys for headsets (#12615)
This commit is contained in:
23
Content.Shared/Radio/EncryptionKeyComponent.cs
Normal file
23
Content.Shared/Radio/EncryptionKeyComponent.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user