diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm
index 9df84e01fd0..6673dce7d91 100644
--- a/code/game/gamemodes/nuclear/pinpointer.dm
+++ b/code/game/gamemodes/nuclear/pinpointer.dm
@@ -26,18 +26,24 @@
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/obj/item/disk/nuclear/the_disk = null
var/obj/machinery/nuclearbomb/the_bomb = null
- var/obj/machinery/nuclearbomb/syndicate/the_s_bomb = null // used by syndicate pinpointers.
- var/cur_index = 1 // Which index the current mode is
- var/mode = MODE_OFF // On which mode the pointer is at
- var/modes = list(MODE_DISK, MODE_NUKE) // Which modes are there
+ // Used by syndicate pinpointers.
+ var/obj/machinery/nuclearbomb/syndicate/the_s_bomb = null
+ // Which index the current mode is.
+ var/cur_index = 1
+ // On which mode the pointer is at.
+ var/mode = MODE_OFF
+ // Which modes are there
+ var/modes = list(MODE_DISK, MODE_NUKE)
var/shows_nuke_timer = TRUE
- var/syndicate = FALSE // Indicates pointer is syndicate, and points to the syndicate nuke.
+ // Indicates pointer is syndicate, and points to the syndicate nuke.
+ var/syndicate = FALSE
var/icon_off = "pinoff"
var/icon_null = "pinonnull"
var/icon_direct = "pinondirect"
var/icon_close = "pinonclose"
var/icon_medium = "pinonmedium"
var/icon_far = "pinonfar"
+ new_attack_chain = TRUE
/obj/item/pinpointer/Initialize(mapload)
. = ..()
@@ -56,10 +62,16 @@
else if(mode == MODE_NUKE)
workbomb()
-/obj/item/pinpointer/attack_self__legacy__attackchain(mob/user)
+/obj/item/pinpointer/activate_self(mob/user)
+ if(..())
+ return ITEM_INTERACT_COMPLETE
+
if(mode == PINPOINTER_MODE_DET)
- return
+ return ITEM_INTERACT_COMPLETE
+
cycle(user)
+ add_fingerprint(user)
+ return ITEM_INTERACT_COMPLETE
/obj/item/pinpointer/proc/cycle(mob/user)
if(cur_index > length(modes))
@@ -92,7 +104,7 @@
if(MODE_TENDRIL)
return "High energy scanner active"
-/obj/item/pinpointer/proc/activate_mode(mode, mob/user) //for crew pinpointer
+/obj/item/pinpointer/proc/activate_mode(mode, mob/user) // For crew pinpointer.
return
/obj/item/pinpointer/proc/scandisk()
@@ -150,14 +162,17 @@
/obj/item/pinpointer/advpinpointer
name = "advanced pinpointer"
- desc = "A larger version of the normal pinpointer, this unit features a helpful quantum entanglement detection system to locate various objects that do not broadcast a locator signal. \n \
- Alt-click to toggle mode."
+ desc = "A larger version of the normal pinpointer, this unit features a helpful quantum entanglement detection system to locate various objects that do not broadcast a locator signal."
modes = list(MODE_ADV)
var/modelocked = FALSE // If true, user cannot change mode.
var/turf/location = null
var/obj/target = null
var/setting = 0
+/obj/item/pinpointer/advpinpointer/examine(mob/user)
+ . = ..()
+ . += SPAN_NOTICE("Alt-click to toggle mode.")
+
/obj/item/pinpointer/advpinpointer/process()
switch(setting)
if(SETTING_DISK)
@@ -167,7 +182,7 @@
if(SETTING_OBJECT)
point_at_target(target)
-/obj/item/pinpointer/advpinpointer/workdisk() //since mode works diffrently for advpinpointer
+/obj/item/pinpointer/advpinpointer/workdisk() // Since mode works differently for advpinpointer.
scandisk()
point_at_target(the_disk)
@@ -289,22 +304,22 @@
worklocation()
/obj/item/pinpointer/nukeop/workdisk()
- if(GLOB.bomb_set) //If the bomb is set, lead to the shuttle
- mode = MODE_SHIP //Ensures worklocation() continues to work
+ if(GLOB.bomb_set) // If the bomb is set, lead to the shuttle.
+ mode = MODE_SHIP // Ensures `worklocation()` continues to work.
modes = list(MODE_SHIP)
- playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) //Plays a beep
- visible_message("Shuttle Locator mode actived.") //Lets the mob holding it know that the mode has changed
- return //Get outta here
+ playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) // Plays a beep.
+ visible_message("Shuttle Locator mode actived.") // Lets the mob holding it know that the mode has changed.
+ return // Get outta here.
scandisk()
point_at_target(the_disk)
/obj/item/pinpointer/nukeop/workbomb()
- if(GLOB.bomb_set) //If the bomb is set, lead to the shuttle
- mode = MODE_SHIP //Ensures worklocation() continues to work
+ if(GLOB.bomb_set) // If the bomb is set, lead to the shuttle.
+ mode = MODE_SHIP // Ensures `worklocation()` continues to work.
modes = list(MODE_SHIP)
- playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) //Plays a beep
- visible_message("Shuttle Locator mode actived.") //Lets the mob holding it know that the mode has changed
- return //Get outta here
+ playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) // Plays a beep.
+ visible_message("Shuttle Locator mode actived.") // Lets the mob holding it know that the mode has changed.
+ return // Get outta here.
scanbomb()
point_at_target(the_s_bomb)
@@ -320,7 +335,7 @@
if(!home)
icon_state = icon_null
return
- if(loc.z != home.z) //If you are on a different z-level from the shuttle
+ if(loc.z != home.z) // If you are on a different z-level from the shuttle.
icon_state = icon_null
else
point_at_target(home)
@@ -340,7 +355,7 @@
/obj/item/pinpointer/operative/proc/scan_for_ops()
if(mode != MODE_OPERATIVE)
return
- nearest_op = null //Resets nearest_op every time it scans
+ nearest_op = null // Resets `nearest_op` every time it scans.
var/closest_distance = 1000
for(var/datum/mind/Mind in SSticker.mode.syndicates)
@@ -391,15 +406,18 @@
icon_medium = "pinonmedium_crew"
icon_far = "pinonfar_crew"
modes = list(MODE_CREW)
- var/target = null //for targeting in processing
- var/target_set = FALSE //have we set a target at any point?
- ///Var to track the linked detective gun
+ // For targeting in processing.
+ var/target = null
+ // Have we set a target at any point?
+ var/target_set = FALSE
+ /// Var to track the linked detective gun.
var/linked_gun_UID
-/obj/item/pinpointer/crew/attackby__legacy__attackchain(obj/item/I, mob/living/user)
+/obj/item/pinpointer/crew/item_interaction(mob/user, obj/item/used, list/modifiers)
. = ..()
- if(istype(I, /obj/item/gun/energy/detective))
- link_gun(I.UID())
+ if(istype(used, /obj/item/gun/energy/detective))
+ link_gun(used.UID())
+ return ITEM_INTERACT_COMPLETE
/obj/item/pinpointer/crew/emp_act(severity)
var/obj/item/gun/energy/detective/D = locateUID(linked_gun_UID)
@@ -539,7 +557,7 @@
/obj/item/pinpointer/tendril/proc/scan_for_tendrils()
var/turf/our_turf = get_turf(src)
if(mode == MODE_TENDRIL)
- target = null //Resets nearest_op every time it scans
+ target = null // Resets nearest_op every time it scans.
var/closest_distance = 1000
for(var/obj/structure/spawner/lavaland/T in GLOB.tendrils)
if(T.z != our_turf.z)
diff --git a/code/modules/antagonists/traitor/contractor/items/contractor_pinpointer.dm b/code/modules/antagonists/traitor/contractor/items/contractor_pinpointer.dm
index fba94ac86e7..6357ca7495a 100644
--- a/code/modules/antagonists/traitor/contractor/items/contractor_pinpointer.dm
+++ b/code/modules/antagonists/traitor/contractor/items/contractor_pinpointer.dm
@@ -37,12 +37,15 @@
var/turf/there = get_turf(H)
return here && there && there.z == here.z
-/obj/item/pinpointer/crew/contractor/attack_self__legacy__attackchain(mob/living/user)
- if(owner)
- if(owner != user.mind.current)
- to_chat(user, SPAN_WARNING("[src] refuses to do anything."))
- return
- else
+/obj/item/pinpointer/crew/contractor/activate_self(mob/living/user)
+ if(!owner)
owner = user.mind.current
to_chat(user, SPAN_NOTICE("[src] now recognizes you as its sole user."))
+ add_fingerprint(user)
+ return ..()
+
+ if(owner != user.mind.current)
+ to_chat(user, SPAN_WARNING("[src] refuses to do anything!"))
+ return ITEM_INTERACT_COMPLETE
+
return ..()