From 110f775d8e72dc5cb7bd39d9afe7c07b0a16389e Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Fri, 10 May 2024 08:57:30 -0500 Subject: [PATCH] fixes some locate checks being in world (#25365) --- code/game/gamemodes/nuclear/pinpointer.dm | 6 +++--- code/game/gamemodes/wizard/spellbook.dm | 3 +-- code/modules/events/blob/overmind.dm | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 6ed2761e5c4..c988d1709eb 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -96,15 +96,15 @@ /obj/item/pinpointer/proc/scandisk() if(!the_disk) - the_disk = locate() + the_disk = locate() in GLOB.poi_list /obj/item/pinpointer/proc/scanbomb() if(!syndicate) if(!the_bomb) - the_bomb = locate() + the_bomb = locate() in GLOB.poi_list else if(!the_s_bomb) - the_s_bomb = locate() + the_s_bomb = locate() in GLOB.poi_list /obj/item/pinpointer/proc/point_at_target(atom/target) if(!target) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index d175fcbf6ad..022c69dc6aa 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -65,8 +65,7 @@ return FALSE /datum/spellbook_entry/proc/Refund(mob/living/carbon/human/user, obj/item/spellbook/book) //return point value or -1 for failure - var/area/wizard_station/A = locate() - if(!(user in A.contents)) + if(!istype(get_area(user), /area/wizard_station)) to_chat(user, "You can only refund spells at the wizard lair.") return -1 if(!S) //This happens when the spell's source is from another spellbook, from loadouts, or adminery, this create a new template temporary spell diff --git a/code/modules/events/blob/overmind.dm b/code/modules/events/blob/overmind.dm index 026712d5ec2..12919ff6944 100644 --- a/code/modules/events/blob/overmind.dm +++ b/code/modules/events/blob/overmind.dm @@ -116,7 +116,7 @@ status_tab_data[++status_tab_data.len] = list("Power Stored:", "[blob_points]/[max_blob_points]") /mob/camera/blob/Move(NewLoc, Dir = 0) - var/obj/structure/blob/B = locate() in range("3x3", NewLoc) + var/obj/structure/blob/B = locate() in range(3, NewLoc) if(B) loc = NewLoc else