From 6be3a9e5fff9401d7d39fa70e11b2eb1febf1b81 Mon Sep 17 00:00:00 2001 From: Seris02 Date: Thu, 16 Feb 2023 13:30:48 +0800 Subject: [PATCH 1/2] cap crystal ooc escape fix --- code/game/objects/items/weapons/capture_crystal.dm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/capture_crystal.dm b/code/game/objects/items/weapons/capture_crystal.dm index 4cc748af13d..e3afa1ecbf0 100644 --- a/code/game/objects/items/weapons/capture_crystal.dm +++ b/code/game/objects/items/weapons/capture_crystal.dm @@ -451,7 +451,15 @@ //Let's let our mob out! /obj/item/capture_crystal/proc/unleash(mob/living/user, atom/target) if(!user && !target) //We got thrown but we're not sure who did it, let's go to where the crystal is - bound_mob.forceMove(src.drop_location()) + var/atom/drop_loc = drop_location() + var/n = 0 + while (istype(drop_loc, /obj/item/weapon/storage) && n++ <= 10) //if they ooc escape inside a bag, this will happen or they won't be able to get out + drop_loc = drop_loc.drop_location() + if (istype(drop_loc, /obj/item/weapon/storage)) + drop_loc = get_turf(src) + if (!drop_loc) + return + bound_mob.forceMove(drop_loc) return if(!target) //We know who wants to let us out, but they didn't say where, so let's drop us on them bound_mob.forceMove(user.drop_location()) From 08f0aafac45c9b8d28b68f3d12e4a47f57ec3231 Mon Sep 17 00:00:00 2001 From: Seris02 Date: Tue, 21 Feb 2023 15:36:30 +0800 Subject: [PATCH 2/2] turf --- code/game/objects/items/weapons/capture_crystal.dm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/code/game/objects/items/weapons/capture_crystal.dm b/code/game/objects/items/weapons/capture_crystal.dm index e3afa1ecbf0..36447ce9cc3 100644 --- a/code/game/objects/items/weapons/capture_crystal.dm +++ b/code/game/objects/items/weapons/capture_crystal.dm @@ -451,15 +451,9 @@ //Let's let our mob out! /obj/item/capture_crystal/proc/unleash(mob/living/user, atom/target) if(!user && !target) //We got thrown but we're not sure who did it, let's go to where the crystal is - var/atom/drop_loc = drop_location() - var/n = 0 - while (istype(drop_loc, /obj/item/weapon/storage) && n++ <= 10) //if they ooc escape inside a bag, this will happen or they won't be able to get out - drop_loc = drop_loc.drop_location() - if (istype(drop_loc, /obj/item/weapon/storage)) - drop_loc = get_turf(src) - if (!drop_loc) - return - bound_mob.forceMove(drop_loc) + var/drop_loc = get_turf(src) + if (drop_loc) + bound_mob.forceMove(drop_loc) return if(!target) //We know who wants to let us out, but they didn't say where, so let's drop us on them bound_mob.forceMove(user.drop_location())