CatStation/Content.Shared/Radio/Components/RadioMicrophoneComponent.cs
phönix da8bf6df00
Predict intercom examine. (#43107)
* radiosystem is funny

* review

Co-authored-by: slarticodefast <slarticodefast@users.noreply.github.com>
Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>

* dont forget your tests

* dont forget your loc

* networking

Co-authored-by: Tayrtahn <Tayrtahn@users.noreply.github.com>

* dont return because its breaks

* uh

* review

Co-authored-by: Pok245 <113675512+Pok27@users.noreply.github.com>

* more predictions and cleanup

* refactor: just me, being picky about whitespaces and commetns formatting

---------

Co-authored-by: slarticodefast <slarticodefast@users.noreply.github.com>
Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
Co-authored-by: Tayrtahn <Tayrtahn@users.noreply.github.com>
Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
Co-authored-by: Pok245 <113675512+Pok27@users.noreply.github.com>
Co-authored-by: Fildrance <fildrance@gmail.com>
2026-08-10 07:59:08 +00:00

50 lines
1.5 KiB
C#

using Content.Shared.Radio.EntitySystems;
using Content.Shared.Chat;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Radio.Components;
/// <summary>
/// Listens for local chat messages and relays them to some radio frequency.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedRadioDeviceSystem))]
public sealed partial class RadioMicrophoneComponent : Component
{
/// <summary>
/// Radio channel on which local speech is broadcast.
/// </summary>
[DataField, AutoNetworkedField]
public ProtoId<RadioChannelPrototype> BroadcastChannel = SharedChatSystem.CommonChannel;
/// <summary>
/// Maximum distance from the microphone at which speech is heard.
/// </summary>
[DataField]
public int ListenRange = 4;
/// <summary>
/// Whether the microphone is currently broadcasting.
/// </summary>
[DataField, AutoNetworkedField]
public bool Enabled;
/// <summary>
/// Whether the microphone requires power to operate.
/// </summary>
[DataField]
public bool PowerRequired;
/// <summary>
/// Whether interacting with this entity toggles it on/off, or not.
/// </summary>
[DataField]
public bool ToggleOnInteract = true;
/// <summary>
/// Whether the speaker must have an unobstructed path to the radio to speak, or now.
/// </summary>
[DataField]
public bool UnobstructedRequired;
}