Merge pull request #13951 from VOREStation/upstream-merge-8772

[MIRROR] Fixes a bug with deleted disposal outlets
This commit is contained in:
Casey
2022-10-23 14:53:07 -04:00
committed by CHOMPStation2
parent 35b0db8c4d
commit 1ecc47c8b1

View File

@@ -1539,6 +1539,12 @@
if(trunk) if(trunk)
trunk.linked = src // link the pipe trunk to self 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 // expel the contents of the holder object, then delete it
// called when the holder exits the outlet // called when the holder exits the outlet
/obj/structure/disposaloutlet/proc/expel(var/obj/structure/disposalholder/H) /obj/structure/disposaloutlet/proc/expel(var/obj/structure/disposalholder/H)