2023-07-11 19:58:18 -04:00
|
|
|
|
using Robust.Shared.GameStates;
|
2024-07-07 10:19:10 -04:00
|
|
|
|
using Robust.Shared.Prototypes;
|
2023-07-11 19:58:18 -04:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Radio.Components;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Handles intercom ui and is authoritative on the channels an intercom can access.
|
|
|
|
|
|
/// </summary>
|
2024-07-07 10:19:10 -04:00
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class IntercomComponent : Component
|
2023-07-11 19:58:18 -04:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2024-07-07 10:19:10 -04:00
|
|
|
|
/// Does this intercom require power to function
|
2023-07-11 19:58:18 -04:00
|
|
|
|
/// </summary>
|
2024-07-07 10:19:10 -04:00
|
|
|
|
[DataField]
|
2023-07-11 19:58:18 -04:00
|
|
|
|
public bool RequiresPower = true;
|
|
|
|
|
|
|
2024-07-07 10:19:10 -04:00
|
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
|
public bool SpeakerEnabled;
|
|
|
|
|
|
|
|
|
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
|
public bool MicrophoneEnabled;
|
|
|
|
|
|
|
|
|
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
|
public ProtoId<RadioChannelPrototype>? CurrentChannel;
|
|
|
|
|
|
|
2023-07-11 19:58:18 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The list of radio channel prototypes this intercom can choose between.
|
|
|
|
|
|
/// </summary>
|
2024-07-07 10:19:10 -04:00
|
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
|
public List<ProtoId<RadioChannelPrototype>> SupportedChannels = new();
|
2023-07-11 19:58:18 -04:00
|
|
|
|
}
|