[DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
public HashSet<string> Channels = new();
+ /// <summary>
+ /// A toggle for globally receiving all radio channels.
+ /// Overrides <see cref="Channels"/>
+ /// </summary>
+ [DataField, ViewVariables(VVAccess.ReadWrite)]
+ public bool ReceiveAllChannels;
+
/// <summary>
/// If this radio can hear all messages on all maps
/// </summary>
var radioQuery = EntityQueryEnumerator<ActiveRadioComponent, TransformComponent>();
while (canSend && radioQuery.MoveNext(out var receiver, out var radio, out var transform))
{
- if (!radio.Channels.Contains(channel.ID) || (TryComp<IntercomComponent>(receiver, out var intercom) && !intercom.SupportedChannels.Contains(channel.ID)))
- continue;
+ if (!radio.ReceiveAllChannels)
+ {
+ if (!radio.Channels.Contains(channel.ID) || (TryComp<IntercomComponent>(receiver, out var intercom) &&
+ !intercom.SupportedChannels.Contains(channel.ID)))
+ continue;
+ }
if (!channel.LongRange && transform.MapID != sourceMapId && !radio.GlobalReceive)
continue;
- 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