From dacc72b732e5614d139fe0ffddda5f9763ab0500 Mon Sep 17 00:00:00 2001 From: Christer2222 <25958019+Christer2222@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:55:28 +0100 Subject: [PATCH] Fixes a runtime with big explosions and disposal units (#31213) * fixed it * update to modern naming scheme * isnull --- code/modules/recycling/disposal.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 88545327e74..78d552829b9 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -59,11 +59,15 @@ T.nicely_link_to_other_stuff(src) //When the disposalsoutlet is forcefully moved. Due to meteorshot (not the recall spell) -/obj/machinery/disposal/Moved(atom/OldLoc, Dir) +/obj/machinery/disposal/Moved(atom/old_loc, Dir) + if(isnull(old_loc)) + return + . = ..() eject() var/ptype = istype(src, /obj/machinery/disposal/delivery_chute) ? PIPE_DISPOSALS_CHUTE : PIPE_DISPOSALS_BIN //Check what disposaltype it is - var/turf/T = OldLoc + var/turf/T = old_loc + if(T.intact) var/turf/simulated/floor/F = T F.remove_tile(null,TRUE,TRUE) @@ -71,6 +75,7 @@ "The floortile is ripped from the floor!", "You hear a loud bang!" ) + if(trunk) trunk.remove_trunk_links() var/obj/structure/disposalconstruct/C = new (loc)