diff --git a/Content.Server/Radio/EntitySystems/RadioSystem.cs b/Content.Server/Radio/EntitySystems/RadioSystem.cs index cbe319ce3cc614..2b3811ca1149cd 100644 --- a/Content.Server/Radio/EntitySystems/RadioSystem.cs +++ b/Content.Server/Radio/EntitySystems/RadioSystem.cs @@ -265,13 +265,14 @@ private void OnEncryptionChannelsChangeTransmitter(Entity entity, ref EncryptionChannelsChangedEvent args) { - if (!TryComp(entity.Owner, out var activeRadio)) - return; - - HashSet channels = entity.Comp.Channels; + HashSet channels = new(); channels.UnionWith(args.Component.Channels); + channels.UnionWith(entity.Comp.Channels); - activeRadio.Channels = new(channels); + if (channels.Count > 0) + EnsureComp(entity.Owner).Channels = channels; + else + RemComp(entity.Owner); } //SS220 PAI with encryption keys end } diff --git a/Resources/Prototypes/SS220/Entities/Objects/Fun/pai.yml b/Resources/Prototypes/SS220/Entities/Objects/Fun/pai.yml index ea304a350e3221..abaf5689ddb803 100644 --- a/Resources/Prototypes/SS220/Entities/Objects/Fun/pai.yml +++ b/Resources/Prototypes/SS220/Entities/Objects/Fun/pai.yml @@ -45,6 +45,9 @@ - type: IntrinsicRadioTransmitter channels: - Binary + - type: ActiveRadio + channels: + - Binary - type: DoAfter - type: Actions - type: TypingIndicator