1
0

IntercomComponent.cs 971 B

1234567891011121314151617181920212223242526272829303132
  1. using Robust.Shared.GameStates;
  2. using Robust.Shared.Prototypes;
  3. namespace Content.Shared.Radio.Components;
  4. /// <summary>
  5. /// Handles intercom ui and is authoritative on the channels an intercom can access.
  6. /// </summary>
  7. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
  8. public sealed partial class IntercomComponent : Component
  9. {
  10. /// <summary>
  11. /// Does this intercom require power to function
  12. /// </summary>
  13. [DataField]
  14. public bool RequiresPower = true;
  15. [DataField, AutoNetworkedField]
  16. public bool SpeakerEnabled;
  17. [DataField, AutoNetworkedField]
  18. public bool MicrophoneEnabled;
  19. [DataField, AutoNetworkedField]
  20. public ProtoId<RadioChannelPrototype>? CurrentChannel;
  21. /// <summary>
  22. /// The list of radio channel prototypes this intercom can choose between.
  23. /// </summary>
  24. [DataField, AutoNetworkedField]
  25. public List<ProtoId<RadioChannelPrototype>> SupportedChannels = new();
  26. }