From 33626b04df2ccd80f53cb4ed0031ded9a0b8cc4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9C=88=E7=8C=AB?= Date: Mon, 4 Jan 2021 20:15:07 -0500 Subject: [PATCH] fix Telekinesis teleporting some items (#55916) * fix Telekinesis teleporting items Fixed telekinesis from teleporting the Blackbox, bodybags and all its contents, and brains from MMIs - Nari * fixes fixes new bug where opening the bodybag in hand will make it vanish - Nari made a better method for pulling items out of the recorder and MMI, if activated by hand it puts item into your hands, if activated with telekinesis, it drops it on its tile - Nari * Update bodybag.dm changes how it gets the location --- code/game/machinery/telecomms/machines/message_server.dm | 4 +++- code/game/objects/items/bodybag.dm | 5 ++++- code/modules/mob/living/brain/MMI.dm | 7 +++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/telecomms/machines/message_server.dm b/code/game/machinery/telecomms/machines/message_server.dm index 64afb911955..afc1b111cc6 100644 --- a/code/game/machinery/telecomms/machines/message_server.dm +++ b/code/game/machinery/telecomms/machines/message_server.dm @@ -24,7 +24,9 @@ /obj/machinery/blackbox_recorder/attack_hand(mob/living/user) . = ..() if(stored) - user.put_in_hands(stored) + stored.forceMove(drop_location()) + if(Adjacent(user)) + user.put_in_hands(stored) stored = null to_chat(user, "You remove the blackbox from [src]. The tapes stop spinning.") update_icon() diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 8f5b5e33435..394714832a8 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -8,7 +8,10 @@ var/unfoldedbag_path = /obj/structure/closet/body_bag /obj/item/bodybag/attack_self(mob/user) - deploy_bodybag(user, user.loc) + if(user.is_holding(src)) + deploy_bodybag(user, get_turf(user)) + else + deploy_bodybag(user, get_turf(src)) /obj/item/bodybag/afterattack(atom/target, mob/user, proximity) . = ..() diff --git a/code/modules/mob/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm index e0bf49b8e9e..9d3c6d451a7 100644 --- a/code/modules/mob/living/brain/MMI.dm +++ b/code/modules/mob/living/brain/MMI.dm @@ -120,10 +120,9 @@ brain.brainmob = brainmob //Set the brain to use the brainmob log_game("[key_name(user)] has ejected the brain of [key_name(brainmob)] from an MMI at [AREACOORD(src)]") brainmob = null //Set mmi brainmob var to null - if(user) - user.put_in_hands(brain) //puts brain in the user's hand or otherwise drops it on the user's turf - else - brain.forceMove(get_turf(src)) + brain.forceMove(drop_location()) + if(Adjacent(user)) + user.put_in_hands(brain) brain.organ_flags &= ~ORGAN_FROZEN brain = null //No more brain in here