Fixes a runtime with big explosions and disposal units (#31213)

* fixed it

* update to modern naming scheme

* isnull
This commit is contained in:
Christer2222
2025-12-09 14:55:28 +00:00
committed by GitHub
parent 924e512840
commit dacc72b732
+7 -2
View File
@@ -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 @@
"<span class='warning'>The floortile is ripped from the floor!</span>",
"<span class='warning'>You hear a loud bang!</span>"
)
if(trunk)
trunk.remove_trunk_links()
var/obj/structure/disposalconstruct/C = new (loc)