Encryption Keys for headsets (#12615)

This commit is contained in:
AlexMorgan3817
2023-01-29 00:53:08 +00:00
committed by GitHub
parent 14ba167201
commit c8b89c7008
33 changed files with 783 additions and 270 deletions

View 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;
}