Allow ghosts to hear radio message globally (#15078)
This commit is contained in:
@@ -14,4 +14,10 @@ public sealed class ActiveRadioComponent : Component
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
|
[DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
|
||||||
public HashSet<string> Channels = new();
|
public HashSet<string> Channels = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If this radio can hear all messages on all maps
|
||||||
|
/// </summary>
|
||||||
|
[DataField("globalReceive")]
|
||||||
|
public bool GlobalReceive = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ public sealed class RadioSystem : EntitySystem
|
|||||||
if (!radio.Channels.Contains(channel.ID))
|
if (!radio.Channels.Contains(channel.ID))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!channel.LongRange && transform.MapID != sourceMapId)
|
if (!channel.LongRange && transform.MapID != sourceMapId && !radio.GlobalReceive)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// don't need telecom server for long range channels or handheld radios and intercoms
|
// don't need telecom server for long range channels or handheld radios and intercoms
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
- Service
|
- Service
|
||||||
- Supply
|
- Supply
|
||||||
- Syndicate
|
- Syndicate
|
||||||
|
globalReceive: true
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
overrideContainerOcclusion: true # Ghosts always show up regardless of where they're contained.
|
overrideContainerOcclusion: true # Ghosts always show up regardless of where they're contained.
|
||||||
netsync: false
|
netsync: false
|
||||||
|
|||||||
Reference in New Issue
Block a user