From 7021e99e0abaaf82e18901ac8ceff673071d4766 Mon Sep 17 00:00:00 2001 From: dj-34 Date: Fri, 1 Dec 2023 01:41:19 +0500 Subject: [PATCH] Fix: Uplink radio exploit --- modular_ss220/devices/code/items/radio.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modular_ss220/devices/code/items/radio.dm b/modular_ss220/devices/code/items/radio.dm index 5e12a73a4daf..ad363ada8c92 100644 --- a/modular_ss220/devices/code/items/radio.dm +++ b/modular_ss220/devices/code/items/radio.dm @@ -42,7 +42,9 @@ . += span_info("Alt-click on \the [name] to toggle broadcasting.") . += span_info("Ctrl-Shift-click on \the [src] to toggle speaker.") -/obj/item/radio/AltClick(mob/user) +/obj/item/radio/AltClick(obj/item/I, mob/user) + if(!istype(I, /obj/item/radio/headset)) + return if(!Adjacent(user)) return if(!iscarbon(usr) && !isrobot(usr)) @@ -53,7 +55,9 @@ broadcasting = !broadcasting to_chat(user, span_notice("You toggle broadcasting [broadcasting ? "on" : "off"].")) -/obj/item/radio/CtrlShiftClick(mob/user) +/obj/item/radio/CtrlShiftClick(obj/item/I, mob/user) + if(!istype(I, /obj/item/radio/headset)) + return if(!Adjacent(user)) return if(!iscarbon(usr) && !isrobot(usr))