Allow ghosts to hear radio message globally (#15078)

This commit is contained in:
adamsong
2023-04-02 19:56:07 -04:00
committed by GitHub
parent 4e978d54a4
commit bcb07142ae
3 changed files with 9 additions and 2 deletions

View File

@@ -14,4 +14,10 @@ public sealed class ActiveRadioComponent : Component
/// </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;
}

View File

@@ -90,7 +90,7 @@ public sealed class RadioSystem : EntitySystem
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

View File

@@ -41,6 +41,7 @@
- Service
- Supply
- Syndicate
globalReceive: true
- type: Sprite
overrideContainerOcclusion: true # Ghosts always show up regardless of where they're contained.
netsync: false