diff --git a/Content.Server/Radio/Components/ActiveRadioComponent.cs b/Content.Server/Radio/Components/ActiveRadioComponent.cs index 6428c0946e..b0a2adbf91 100644 --- a/Content.Server/Radio/Components/ActiveRadioComponent.cs +++ b/Content.Server/Radio/Components/ActiveRadioComponent.cs @@ -15,6 +15,13 @@ public sealed partial class ActiveRadioComponent : Component [DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] public HashSet Channels = new(); + /// + /// A toggle for globally receiving all radio channels. + /// Overrides + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public bool ReceiveAllChannels; + /// /// If this radio can hear all messages on all maps /// diff --git a/Content.Server/Radio/EntitySystems/RadioSystem.cs b/Content.Server/Radio/EntitySystems/RadioSystem.cs index fa00514e61..92e8139c75 100644 --- a/Content.Server/Radio/EntitySystems/RadioSystem.cs +++ b/Content.Server/Radio/EntitySystems/RadioSystem.cs @@ -103,8 +103,12 @@ public sealed class RadioSystem : EntitySystem var radioQuery = EntityQueryEnumerator(); while (canSend && radioQuery.MoveNext(out var receiver, out var radio, out var transform)) { - if (!radio.Channels.Contains(channel.ID) || (TryComp(receiver, out var intercom) && !intercom.SupportedChannels.Contains(channel.ID))) - continue; + if (!radio.ReceiveAllChannels) + { + if (!radio.Channels.Contains(channel.ID) || (TryComp(receiver, out var intercom) && + !intercom.SupportedChannels.Contains(channel.ID))) + continue; + } if (!channel.LongRange && transform.MapID != sourceMapId && !radio.GlobalReceive) continue; diff --git a/Resources/Prototypes/Entities/Mobs/Player/observer.yml b/Resources/Prototypes/Entities/Mobs/Player/observer.yml index d03281a212..114c3fa747 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/observer.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/observer.yml @@ -39,19 +39,7 @@ - type: MovementIgnoreGravity - type: IntrinsicRadioReceiver - type: ActiveRadio - channels: - - Binary - - Common - - Command - - CentCom - - Engineering - - Medical - - Science - - Security - - Service - - Supply - - Syndicate - - Freelance + receiveAllChannels: true globalReceive: true - type: Physics bodyType: KinematicController