6
2026-01-24 12:49:55 +03:00

45 lines
1.3 KiB
C#

using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Radio.Components;
/// <summary>
/// Handles intercom ui and is authoritative on the channels an intercom can access.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
public sealed partial class IntercomComponent : Component
{
/// <summary>
/// Does this intercom require power to function
/// </summary>
[DataField]
public bool RequiresPower = true;
[DataField, AutoNetworkedField]
public bool SpeakerEnabled;
[DataField, AutoNetworkedField]
public bool MicrophoneEnabled;
[DataField, AutoNetworkedField]
public ProtoId<RadioChannelPrototype>? CurrentChannel;
/// <summary>
/// The list of radio channel prototypes this intercom can choose between.
/// </summary>
[DataField, AutoNetworkedField]
public List<ProtoId<RadioChannelPrototype>> SupportedChannels = new();
/// <summary>
/// Frontier - Start the intercom speaker with the map.
/// </summary>
[DataField]
public bool StartSpeakerOnMapInit { get; set; } = false;
/// <summary>
/// Frontier - Start the intercom microphone with the map.
/// </summary>
[DataField]
public bool StartMicrophoneOnMapInit { get; set; } = false;
}