From db66ac5c50471829b1e10fb63a4784457f089302 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 6 Feb 2021 04:25:13 +0300 Subject: [PATCH] Various crew tracking fixes (#56591) Nanite Monitoring program now makes people trackable as if they have enabled their suit sensors, as stated in the program description. Now you can track people with Nanites Monitoring program using following devices: Crew pinpointer (arrow) Crew pinpointer - contractor version (arrow) Crew pinpointer (proximity) Lifeline radar (modular computers software) Also fixed multi-Z tracking for the first three devices. When the target is on different Z of the same station, it shows "?" icon. Also, the stationary crew monitor will now work properly on multi-Z stations. --- code/game/machinery/computer/crew.dm | 3 ++- code/game/objects/items/pinpointer.dm | 18 ++++++++---------- .../file_system/programs/radar.dm | 15 ++++++++------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index a74900e4e92..114745030ed 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -128,7 +128,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) stack_trace("Tracked mob has no loc and is likely in nullspace: [tracked_living_mob] ([tracked_living_mob.type])") continue - if (pos.z != z) + // Machinery and the target should be on the same level or different levels of the same station + if(pos.z != z && (!is_station_level(pos.z) || !is_station_level(z))) continue var/sensor_mode diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm index f6cf1c078cf..72763c7caad 100644 --- a/code/game/objects/items/pinpointer.dm +++ b/code/game/objects/items/pinpointer.dm @@ -97,16 +97,14 @@ /obj/item/pinpointer/crew/proc/trackable(mob/living/carbon/human/H) var/turf/here = get_turf(src) - if((H.z == 0 || H.z == here.z) && istype(H.w_uniform, /obj/item/clothing/under)) - var/obj/item/clothing/under/U = H.w_uniform - - // Suit sensors must be on maximum. - if(!U.has_sensor || (U.sensor_mode < SENSOR_COORDS && !ignore_suit_sensor_level)) - return FALSE - - var/turf/there = get_turf(H) - return (H.z != 0 || (there && there.z == here.z)) - + var/turf/there = get_turf(H) + if(here && there && (there.z == here.z || (is_station_level(here.z) && is_station_level(there.z)))) // Device and target should be on the same level or different levels of the same station + if (H in GLOB.nanite_sensors_list) + return TRUE + if (istype(H.w_uniform, /obj/item/clothing/under)) + var/obj/item/clothing/under/U = H.w_uniform + if(U.has_sensor && (U.sensor_mode >= SENSOR_COORDS || ignore_suit_sensor_level)) // Suit sensors must be on maximum or a contractor pinpointer + return TRUE return FALSE /obj/item/pinpointer/crew/attack_self(mob/living/user) diff --git a/code/modules/modular_computers/file_system/programs/radar.dm b/code/modules/modular_computers/file_system/programs/radar.dm index 0bf5eb21184..9f570fe6a4c 100644 --- a/code/modules/modular_computers/file_system/programs/radar.dm +++ b/code/modules/modular_computers/file_system/programs/radar.dm @@ -241,13 +241,14 @@ /datum/computer_file/program/radar/lifeline/trackable(mob/living/carbon/human/humanoid) if(!humanoid || !istype(humanoid)) return FALSE - if(..() && istype(humanoid.w_uniform, /obj/item/clothing/under)) - - var/obj/item/clothing/under/uniform = humanoid.w_uniform - if(!uniform.has_sensor || (uniform.sensor_mode < SENSOR_COORDS)) // Suit sensors must be on maximum. - return FALSE - - return TRUE + if(..()) + if (humanoid in GLOB.nanite_sensors_list) + return TRUE + if (istype(humanoid.w_uniform, /obj/item/clothing/under)) + var/obj/item/clothing/under/uniform = humanoid.w_uniform + if(uniform.has_sensor && uniform.sensor_mode >= SENSOR_COORDS) // Suit sensors must be on maximum + return TRUE + return FALSE //////////////////////// //Nuke Disk Finder App//