From 7544c4c38ef73da3aaa9d1e57d561ae14a4db9b4 Mon Sep 17 00:00:00 2001 From: nevimer <77420409+nevimer@users.noreply.github.com> Date: Sat, 28 Jan 2023 15:19:42 -0500 Subject: [PATCH] [Manual Mirror] One use portals will only become used up when they successfully telep (#18981) One use portals will only become used up when they successfully teleport (#71034) Makes one use portals self-qdel only when they confirm that whatever tries using them has teleported. (cherry picked from commit ecd62aed241817c78e8d0356601b751dc29aa5c7) Co-authored-by: Striders13 <53361823+Striders13@users.noreply.github.com> --- code/game/objects/effects/portals.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index e35dc79ea2c..a29be972dc6 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -183,4 +183,5 @@ /obj/effect/portal/permanent/one_way/one_use/teleport(atom/movable/M, force = FALSE) . = ..() - qdel(src) + if (. && !isdead(M)) + qdel(src)