Skip to content

Commit

Permalink
Encryption keys Pai fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirus59 committed Sep 23, 2024
1 parent 25dc94e commit b9df268
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Content.Server/Radio/EntitySystems/RadioSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,14 @@ private void OnEncryptionChannelsChangeTransmitter(Entity<IntrinsicRadioTransmit

private void OnEncryptionChannelsChangeReceiver(Entity<IntrinsicRadioReceiverComponent> entity, ref EncryptionChannelsChangedEvent args)
{
if (!TryComp<ActiveRadioComponent>(entity.Owner, out var activeRadio))
return;

HashSet<string> channels = entity.Comp.Channels;
HashSet<string> channels = new();
channels.UnionWith(args.Component.Channels);
channels.UnionWith(entity.Comp.Channels);

activeRadio.Channels = new(channels);
if (channels.Count > 0)
EnsureComp<ActiveRadioComponent>(entity.Owner).Channels = channels;
else
RemComp<ActiveRadioComponent>(entity.Owner);
}
//SS220 PAI with encryption keys end
}
1 change: 1 addition & 0 deletions Resources/Prototypes/SS220/Entities/Objects/Fun/pai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
- type: IntrinsicRadioTransmitter
channels:
- Binary
- type: ActiveRadio
- type: DoAfter
- type: Actions
- type: TypingIndicator
Expand Down

0 comments on commit b9df268

Please sign in to comment.