diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index 2d70810384b..4ad1b91da16 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -399,26 +399,27 @@
return FALSE
return ..()
-/obj/item/radio/headset/attackby__legacy__attackchain(obj/item/key, mob/user)
- if(istype(key, /obj/item/encryptionkey/))
+/obj/item/radio/headset/item_interaction(mob/user, obj/item/used, list/modifiers)
+ if(!istype(used, /obj/item/encryptionkey))
+ return NONE
- if(keyslot1 && keyslot2)
- to_chat(user, "The headset can't hold another key!")
- return
+ if(keyslot1 && keyslot2)
+ to_chat(user, SPAN_WARNING("[src] can't hold another key!"))
+ return ITEM_INTERACT_COMPLETE
- if(!user.transfer_item_to(key, src, FALSE, FALSE))
- to_chat(user, SPAN_WARNING("[key] is stuck to your hand, you can't insert it in [src]."))
- return
+ if(!user.transfer_item_to(used, src, FALSE, FALSE))
+ to_chat(user, SPAN_WARNING("[used] is stuck to your hand, you can't insert it in [src]!"))
+ return ITEM_INTERACT_COMPLETE
- if(!keyslot1)
- keyslot1 = key
- else
- keyslot2 = key
+ if(!keyslot1)
+ keyslot1 = used
+ else
+ keyslot2 = used
- recalculateChannels()
- return
-
- return ..()
+ to_chat(user, SPAN_NOTICE("You insert [used] into [src]."))
+ add_fingerprint(user)
+ recalculateChannels()
+ return ITEM_INTERACT_COMPLETE
/obj/item/radio/headset/screwdriver_act(mob/user, obj/item/I)
. = TRUE
@@ -434,19 +435,19 @@
if(keyslot1)
var/turf/T = get_turf(user)
if(T)
- keyslot1.loc = T
+ keyslot1.forceMove(T)
keyslot1 = null
if(keyslot2)
var/turf/T = get_turf(user)
if(T)
- keyslot2.loc = T
+ keyslot2.forceMove(T)
keyslot2 = null
recalculateChannels()
- to_chat(user, "You pop out the encryption keys in the headset!")
+ to_chat(user, SPAN_NOTICE("You pop out the encryption keys in the headset!"))
I.play_tool_sound(user, I.tool_volume)
else
- to_chat(user, "This headset doesn't have any encryption keys! How useless...")
+ to_chat(user, SPAN_NOTICE("This headset doesn't have any encryption keys! How useless..."))
/obj/item/radio/headset/recalculateChannels(setDescription = FALSE)
channels = list()
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index 241b7dd1966..1ed8ce0d891 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -115,11 +115,11 @@
/obj/item/radio/intercom/attack_ai(mob/user)
add_hiddenprint(user)
add_fingerprint(user)
- attack_self__legacy__attackchain(user)
+ activate_self(user)
/obj/item/radio/intercom/attack_hand(mob/user)
add_fingerprint(user)
- attack_self__legacy__attackchain(user)
+ activate_self(user)
/obj/item/radio/intercom/receive_range(freq, level)
if(!is_listening())
@@ -131,7 +131,7 @@
return -1
if(freq in SSradio.ANTAG_FREQS)
if(!(syndiekey))
- return -1//Prevents broadcast of messages over devices lacking the encryption
+ return -1 // Prevents broadcast of messages over devices lacking the encryption.
return canhear_range
@@ -145,33 +145,37 @@
if(2)
. += SPAN_NOTICE("The intercom is wired, and the maintenance panel is unscrewed.")
-/obj/item/radio/intercom/attackby__legacy__attackchain(obj/item/W, mob/user)
- if(istype(W, /obj/item/stack/tape_roll)) //eww
- return
- else if(iscoil(W) && buildstage == 1)
- var/obj/item/stack/cable_coil/coil = W
+/obj/item/radio/intercom/item_interaction(mob/user, obj/item/used, list/modifiers)
+ if(istype(used, /obj/item/stack/tape_roll)) // Eww.
+ return ITEM_INTERACT_COMPLETE
+
+ if(iscoil(used) && buildstage == 1)
+ var/obj/item/stack/cable_coil/coil = used
if(coil.get_amount() < 5)
to_chat(user, SPAN_WARNING("You need more cable for this!"))
- return
+ return ITEM_INTERACT_COMPLETE
if(do_after(user, 10 * coil.toolspeed, target = src) && buildstage == 1)
coil.use(5)
- to_chat(user, SPAN_NOTICE("You wire \the [src]!"))
+ to_chat(user, SPAN_NOTICE("You wire [src]!"))
buildstage = 2
- return 1
- else if(istype(W,/obj/item/intercom_electronics) && buildstage == 0)
- playsound(get_turf(src), W.usesound, 50, 1)
- if(do_after(user, 10 * W.toolspeed, target = src) && buildstage == 0)
- qdel(W)
- to_chat(user, SPAN_NOTICE("You insert \the [W] into \the [src]!"))
+ add_fingerprint(user)
+ return ITEM_INTERACT_COMPLETE
+
+ if(istype(used, /obj/item/intercom_electronics) && buildstage == 0)
+ playsound(get_turf(src), used.usesound, 50, 1)
+ if(do_after(user, 10 * used.toolspeed, target = src) && buildstage == 0)
+ qdel(used)
+ to_chat(user, SPAN_NOTICE("You insert [used] into [src]!"))
buildstage = 1
- return 1
- else
- return ..()
+ add_fingerprint(user)
+ return ITEM_INTERACT_COMPLETE
+
+ return ..()
/obj/item/radio/intercom/AltClick(mob/user)
. = ..()
if(broadcasting)
- investigate_log("had its hotmic toggled on via hotkey by [key_name(user)].", INVESTIGATE_HOTMIC) ///Allows us to track who spams all these on if they do.
+ investigate_log("had its hotmic toggled on via hotkey by [key_name(user)].", INVESTIGATE_HOTMIC) /// Allows us to track who spams all these on if they do.
/obj/item/radio/intercom/crowbar_act(mob/user, obj/item/I)
if(buildstage != 1)
diff --git a/code/game/objects/items/devices/radio/radio_objects.dm b/code/game/objects/items/devices/radio/radio_objects.dm
index fb8cb0f5373..a28e2f26ca6 100644
--- a/code/game/objects/items/devices/radio/radio_objects.dm
+++ b/code/game/objects/items/devices/radio/radio_objects.dm
@@ -84,6 +84,7 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems)
/// A timer that, when going off, will turn this radio on again
var/radio_enable_timer
+ new_attack_chain = TRUE
/obj/item/radio/proc/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
@@ -118,12 +119,16 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems)
/obj/item/radio/attack_ghost(mob/user)
return interact(user)
-/obj/item/radio/attack_self__legacy__attackchain(mob/user)
+/obj/item/radio/activate_self(mob/user)
+ if(..())
+ return ITEM_INTERACT_COMPLETE
interact(user)
+ add_fingerprint(user)
+ return ITEM_INTERACT_COMPLETE
/obj/item/radio/interact(mob/user)
if(!user)
- return 0
+ return FALSE
if(b_stat)
wires.Interact(user)
return
@@ -672,22 +677,20 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems)
/obj/item/radio/borg/ert/specops
keyslot = new /obj/item/encryptionkey/centcom
-/obj/item/radio/borg/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
- if(istype(W, /obj/item/encryptionkey/))
+/obj/item/radio/borg/item_interaction(mob/user, obj/item/used, list/modifiers)
+ if(!istype(used, /obj/item/encryptionkey))
+ return NONE
- if(keyslot)
- to_chat(user, "The radio can't hold another key!")
- return
+ if(keyslot)
+ to_chat(user, SPAN_WARNING("The radio can't hold another key!"))
+ return ITEM_INTERACT_COMPLETE
- if(!keyslot)
- user.drop_item()
- W.loc = src
- keyslot = W
+ user.drop_item()
+ used.forceMove(src)
+ keyslot = used
- recalculateChannels()
- return
-
- return ..()
+ recalculateChannels()
+ return ITEM_INTERACT_COMPLETE
/obj/item/radio/borg/screwdriver_act(mob/user, obj/item/I)
. = TRUE
@@ -699,19 +702,17 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems)
SSradio.remove_object(src, SSradio.radiochannels[ch_name])
secure_radio_connections[ch_name] = null
-
- if(keyslot)
- var/turf/T = get_turf(user)
- if(T)
- keyslot.loc = T
- keyslot = null
+ var/turf/T = get_turf(user)
+ if(T)
+ keyslot.forceMove(T)
+ keyslot = null
recalculateChannels()
- to_chat(user, "You pop out the encryption key in the radio!")
+ to_chat(user, SPAN_NOTICE("You pop out the encryption key in the radio!"))
I.play_tool_sound(user, I.tool_volume)
else
- to_chat(user, "This radio doesn't have any encryption keys!")
+ to_chat(user, SPAN_WARNING("This radio doesn't have any encryption keys!"))
/obj/item/radio/borg/recalculateChannels()
channels = list()
diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm
index 5e7c7f52660..36f549e097f 100644
--- a/code/game/objects/items/devices/uplinks.dm
+++ b/code/game/objects/items/devices/uplinks.dm
@@ -30,6 +30,7 @@ GLOBAL_LIST_EMPTY(world_uplinks)
var/items_generated = FALSE
var/datum/data/record/selected_record
+ new_attack_chain = TRUE
/obj/item/uplink/ui_host()
return loc
@@ -445,9 +446,12 @@ GLOBAL_LIST_EMPTY(world_uplinks)
/obj/item/radio/uplink/show_examine_hotkeys()
return list()
-/obj/item/radio/uplink/attack_self__legacy__attackchain(mob/user as mob)
+/obj/item/radio/uplink/activate_self(mob/user)
+ if(!user)
+ return ..()
if(hidden_uplink)
hidden_uplink.trigger(user)
+ return ITEM_INTERACT_COMPLETE
/obj/item/radio/uplink/nuclear/Initialize(mapload)
. = ..()
diff --git a/code/modules/mob/living/silicon/robot/robot_mob.dm b/code/modules/mob/living/silicon/robot/robot_mob.dm
index 75136f06766..4ba792bdc41 100644
--- a/code/modules/mob/living/silicon/robot/robot_mob.dm
+++ b/code/modules/mob/living/silicon/robot/robot_mob.dm
@@ -1076,7 +1076,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if(istype(used, /obj/item/encryptionkey) && opened)
if(radio)
to_chat(user, SPAN_NOTICE("You install [used] into [src]'s radio."))
- radio.attackby__legacy__attackchain(used, user)
+ radio.item_interaction(user, used)
else
to_chat(user, SPAN_WARNING("[src] has no radio!"))
return ITEM_INTERACT_COMPLETE
@@ -1381,7 +1381,10 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if(href_list["mod"])
var/obj/item/O = locate(href_list["mod"])
if(istype(O) && (O.loc == src))
- O.attack_self__legacy__attackchain(src)
+ if(O.new_attack_chain)
+ O.activate_self(src)
+ else
+ O.attack_self__legacy__attackchain(src)
return TRUE
if(href_list["act"])