/// </summary>
[DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
public HashSet<string> Channels = new();
+
+ /// <summary>
+ /// If this radio can hear all messages on all maps
+ /// </summary>
+ [DataField("globalReceive")]
+ public bool GlobalReceive = false;
}
if (!radio.Channels.Contains(channel.ID))
continue;
- if (!channel.LongRange && transform.MapID != sourceMapId)
+ if (!channel.LongRange && transform.MapID != sourceMapId && !radio.GlobalReceive)
continue;
// don't need telecom server for long range channels or handheld radios and intercoms
var needServer = !channel.LongRange && (!hasMicro || !speakerQuery.HasComponent(receiver));
if (needServer && !hasActiveServer)
continue;
-
+
// check if message can be sent to specific receiver
var attemptEv = new RadioReceiveAttemptEvent(channel, radioSource, receiver);
RaiseLocalEvent(ref attemptEv);