Files
crystall-punk-14/Content.Shared/Radio/Components/EncryptionKeyHolderComponent.cs

53 lines
1.6 KiB
C#
Raw Permalink Normal View History

2023-02-19 06:27:56 +13:00
using Content.Shared.Chat;
using Content.Shared.Tools;
using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
2023-02-19 06:27:56 +13:00
namespace Content.Shared.Radio.Components;
/// <summary>
/// This component is by entities that can contain encryption keys
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class EncryptionKeyHolderComponent : Component
2023-02-19 06:27:56 +13:00
{
/// <summary>
/// Whether or not encryption keys can be removed from the headset.
/// </summary>
[DataField]
2023-02-19 06:27:56 +13:00
public bool KeysUnlocked = true;
/// <summary>
/// The tool required to extract the encryption keys from the headset.
/// </summary>
[DataField]
public ProtoId<ToolQualityPrototype> KeysExtractionMethod = "Screwing";
2023-02-19 06:27:56 +13:00
[DataField]
2023-02-19 06:27:56 +13:00
public int KeySlots = 2;
[DataField]
2023-02-19 06:27:56 +13:00
public SoundSpecifier KeyExtractionSound = new SoundPathSpecifier("/Audio/Items/pistol_magout.ogg");
[DataField]
2023-02-19 06:27:56 +13:00
public SoundSpecifier KeyInsertionSound = new SoundPathSpecifier("/Audio/Items/pistol_magin.ogg");
[ViewVariables]
public Container KeyContainer = default!;
public const string KeyContainerName = "key_slots";
/// <summary>
/// Combined set of radio channels provided by all contained keys.
/// </summary>
[ViewVariables]
public HashSet<ProtoId<RadioChannelPrototype>> Channels = new();
2023-02-19 06:27:56 +13:00
/// <summary>
/// This is the channel that will be used when using the default/department prefix (<see cref="SharedChatSystem.DefaultChannelKey"/>).
/// </summary>
[ViewVariables]
public string? DefaultChannel;
}