From 7b06cbb63a5b07c61cd766b17c4531e0d7ef8ec0 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Wed, 13 Jun 2018 18:37:44 -0400 Subject: [PATCH] [s] Fixes BoH loc being determined before warning prompt (#38459) * This is clearly @kevinz000' fault * Not even null checking properly, smh * Speling * Fax --- code/datums/components/storage/concrete/bag_of_holding.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/datums/components/storage/concrete/bag_of_holding.dm b/code/datums/components/storage/concrete/bag_of_holding.dm index e5da9adcde9..765889849b9 100644 --- a/code/datums/components/storage/concrete/bag_of_holding.dm +++ b/code/datums/components/storage/concrete/bag_of_holding.dm @@ -1,6 +1,9 @@ /datum/component/storage/concrete/bluespace/bag_of_holding/handle_item_insertion(obj/item/W, prevent_warning = FALSE, mob/living/user) var/atom/A = parent if((istype(W, /obj/item/storage/backpack/holding) || count_by_type(W.GetAllContents(), /obj/item/storage/backpack/holding))) + var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", "Abort", "Proceed") + if(safety != "Proceed" || QDELETED(A) || QDELETED(W) || QDELETED(user) || !user.canUseTopic(A, BE_CLOSE, iscarbon(user))) + return var/turf/loccheck = get_turf(A) if(is_reebe(loccheck.z)) user.visible_message("An unseen force knocks [user] to the ground!", "\"I think not!\"") @@ -8,9 +11,6 @@ return if(istype(loccheck.loc, /area/fabric_of_reality)) to_chat(user, "You can't do that here!") - var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", "Abort", "Proceed") - if(safety == "Abort" || !in_range(A, user) || !A || !W || user.incapacitated()) - return to_chat(user, "The Bluespace interfaces of the two devices catastrophically malfunction!") qdel(W) playsound(loccheck,'sound/effects/supermatter.ogg', 200, 1)