From 1ecc47c8b1a7ddb89fd93d58e234aa55930c7a3a Mon Sep 17 00:00:00 2001 From: Casey Date: Sun, 23 Oct 2022 14:53:07 -0400 Subject: [PATCH] Merge pull request #13951 from VOREStation/upstream-merge-8772 [MIRROR] Fixes a bug with deleted disposal outlets --- code/modules/recycling/disposal.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 662295e578..a5e95899f5 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -1539,6 +1539,12 @@ if(trunk) trunk.linked = src // link the pipe trunk to self +/obj/structure/disposaloutlet/Destroy() + var/obj/structure/disposalpipe/trunk/trunk = locate() in loc + if(trunk && trunk.linked == src) + trunk.linked = null + return ..() + // expel the contents of the holder object, then delete it // called when the holder exits the outlet /obj/structure/disposaloutlet/proc/expel(var/obj/structure/disposalholder/H)