From 168c9e4e8a19bdbde7c6cadf57bd222d79b64630 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:37:12 +0200 Subject: [PATCH] [MIRROR] Fixes bluespace bodybag duping [MDB IGNORE] (#22693) * Fixes bluespace bodybag duping (#77067) ## About The Pull Request Folded bluespace bodybags had no prior checks to see if the person picking the item up was the one inside of the bag. This naturally broke things, because BYOND doesn't like it when you have an infinite cycle of locs, so it refuses to move the folded bluespace item onto your mob. This then leads to the bluespace bodybag duping bug, as the item is still in your hand even though it really isn't. ## Why It's Good For The Game Fixes #44902 ## Changelog :cl: fix: Fixed a rare bug that let you spam bluespace bodybags everywhere. /:cl: * Fixes bluespace bodybag duping --------- Co-authored-by: distributivgesetz --- code/game/objects/items/bodybag.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 1109890e653..7e67b23c3b7 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -20,6 +20,12 @@ if(isopenturf(target)) deploy_bodybag(user, target) +/obj/item/bodybag/attempt_pickup(mob/user) + // can't pick ourselves up if we are inside of the bodybag, else very weird things may happen + if(contains(user)) + return TRUE + return ..() + /** * Creates a new body bag item when unfolded, at the provided location, replacing the body bag item. * * mob/user: User opening the body bag.