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
This commit is contained in:
小月猫
2021-01-04 17:15:07 -08:00
committed by GitHub
parent 6cfe19a166
commit 33626b04df
3 changed files with 10 additions and 6 deletions
@@ -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, "<span class='notice'>You remove the blackbox from [src]. The tapes stop spinning.</span>")
update_icon()
+4 -1
View File
@@ -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)
. = ..()
+3 -4
View File
@@ -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