From f9bdf3ab6cca665b2b463b4c83fd964adbc60843 Mon Sep 17 00:00:00 2001 From: alex-gh Date: Thu, 23 May 2019 12:10:37 +0200 Subject: [PATCH 1/2] Theft objective locations hints now ignore the Centcomm Z level. --- code/game/gamemodes/objective.dm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 7c358ba951d..40b5a349077 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -344,11 +344,14 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu var/theft_area /datum/objective/steal/proc/get_location() - if(steal_target.location_override) - return steal_target.location_override - var/obj/item/T = locate(steal_target.typepath) - theft_area = get_area(T.loc) - return "[theft_area]" + if(steal_target.location_override) + return steal_target.location_override + var/list/obj/item/steal_candidates = get_all_of_type(steal_target.typepath, subtypes = TRUE) + for(var/obj/item/candidate in steal_candidates) + if(!is_admin_level(candidate.loc.z)) + theft_area = get_area(candidate.loc) + return "[theft_area]" + return "an unknown area" /datum/objective/steal/find_target() var/loop=50 From 1bcad49821e1f8a1b56ea18eb8b4eb05543f38db Mon Sep 17 00:00:00 2001 From: alex-gh Date: Thu, 23 May 2019 12:11:09 +0200 Subject: [PATCH 2/2] Adv. Pinpointer no longer targets items in Centcom Z level. --- code/game/gamemodes/nuclear/pinpointer.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index d221c94d39f..bfc30780b81 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -165,7 +165,10 @@ var/targetitem = input("Select item to search for.", "Item Mode Select","") as null|anything in item_names if(!targetitem) return - target = locate(item_paths[targetitem]) + var/list/obj/item/target_candidates = get_all_of_type(item_paths[targetitem], subtypes = TRUE) + for(var/obj/item/candidate in target_candidates) + if(!is_admin_level(candidate.loc.z)) + target = candidate if(!target) to_chat(usr, "Failed to locate [targetitem]!") return