Skip to content

Commit

Permalink
Fixes radio channels defaulting to common when no encryption key (#10129
Browse files Browse the repository at this point in the history
)

* Fixes radio channels defaulting to common when no encryption key is installed

* warning message
  • Loading branch information
BeeLover66 authored Nov 4, 2023
1 parent 16f5be3 commit 4724a75
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/game/objects/items/devices/radio/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,12 @@

// From the channel, determine the frequency and get a reference to it.
var/freq
if(channel && channels && channels.len > 0)
if(channel == MODE_DEPARTMENT)
if(channel && channels)
if(channel == MODE_DEPARTMENT && channels.len > 0)
channel = channels[1]
freq = secure_radio_connections[channel]
if(istype(M, /mob) && !freq && channel != RADIO_CHANNEL_UPLINK)
to_chat(M, "<span class='warning'>You can't access this channel without an encryption key!</span>")
if (!channels[channel]) // if the channel is turned off, don't broadcast
return
else
Expand Down

0 comments on commit 4724a75

Please sign in to comment.