diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index 3b7e66b7df..2f3a9c682e 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -169,19 +169,13 @@
| Transmit: |
- [(radio.wires & 4) ? "En" : "Dis" ]abled
+ | [radio.broadcasting ? "En" : "Dis" ]abled
|
| Receive: |
- [(radio.wires & 2) ? "En" : "Dis" ]abled
-
- |
-
-
- | Signal Pulser: |
- [(radio.wires & 1) ? "En" : "Dis" ]abled
+ | [radio.listening ? "En" : "Dis" ]abled
|
@@ -261,10 +255,11 @@
removePersonality()
if(href_list["wires"])
var/t1 = text2num(href_list["wires"])
- if (radio.wires & t1)
- radio.wires &= ~t1
- else
- radio.wires |= t1
+ switch(t1)
+ if(4)
+ radio.ToggleBroadcast()
+ if(2)
+ radio.ToggleReception()
if(href_list["setlaws"])
var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message),1,MAX_MESSAGE_LEN)
if(newlaws)
@@ -315,4 +310,4 @@
if(pai)
pai.ex_act(severity)
else
- del(src)
+ del(src)
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index dad292fd47..bb6f0d91f5 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -108,6 +108,12 @@
Speaker: [list ? "Engaged" : "Disengaged"]
"}
+/obj/item/device/radio/proc/ToggleBroadcast()
+ broadcasting = !broadcasting && !(wires.IsIndexCut(WIRE_TRANSMIT) || wires.IsIndexCut(WIRE_SIGNAL))
+
+/obj/item/device/radio/proc/ToggleReception()
+ listening = !listening && !(wires.IsIndexCut(WIRE_RECEIVE) || wires.IsIndexCut(WIRE_SIGNAL))
+
/obj/item/device/radio/Topic(href, href_list)
//..()
if (usr.stat || !on)
@@ -135,11 +141,11 @@
return
else if (href_list["talk"])
- broadcasting = !(wires.IsIndexCut(WIRE_TRANSMIT) || wires.IsIndexCut(WIRE_SIGNAL)) && text2num(href_list["talk"])
+ ToggleBroadcast()
else if (href_list["listen"])
var/chan_name = href_list["ch_name"]
if (!chan_name)
- listening = !(wires.IsIndexCut(WIRE_RECEIVE) || wires.IsIndexCut(WIRE_SIGNAL)) && text2num(href_list["listen"])
+ ToggleReception()
else
if (channels[chan_name] & FREQ_LISTENING)
channels[chan_name] &= ~FREQ_LISTENING