EncryptionKeyComponent.cs 1009 B

12345678910111213141516171819202122
  1. using Content.Shared.Chat;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
  4. namespace Content.Shared.Radio.Components;
  5. /// <summary>
  6. /// This component is currently used for providing access to channels for "HeadsetComponent"s.
  7. /// It should be used for intercoms and other radios in future.
  8. /// </summary>
  9. [RegisterComponent]
  10. public sealed partial class EncryptionKeyComponent : Component
  11. {
  12. [DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
  13. public HashSet<string> Channels = new();
  14. /// <summary>
  15. /// This is the channel that will be used when using the default/department prefix (<see cref="SharedChatSystem.DefaultChannelKey"/>).
  16. /// </summary>
  17. [DataField("defaultChannel", customTypeSerializer: typeof(PrototypeIdSerializer<RadioChannelPrototype>))]
  18. public string? DefaultChannel;
  19. }