From 2f9be72b5b43678940feaf6008b3c775b73a10c9 Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Wed, 26 Sep 2018 17:05:48 +0200 Subject: [PATCH] Fixed it --- .../recycling/disposal-construction.dm | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 3bb3c237d07..09fd3dcdba3 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -187,24 +187,22 @@ update() return - var/obj/structure/disposalpipe/CP = locate() in T + if(ptype in list(PIPE_DISPOSALS_BIN, PIPE_DISPOSALS_OUTLET, PIPE_DISPOSALS_CHUTE)) // Disposal or outlet - if(CP) // There's something there - if(!istype(CP,/obj/structure/disposalpipe/trunk)) - to_chat(user, "The [nicetype] requires a trunk underneath it in order to work.") - return - else // Nothing under, fuck. + var/obj/structure/disposalpipe/trunk/CP = locate() in T + if(!CP) // There's no trunk to_chat(user, "The [nicetype] requires a trunk underneath it in order to work.") return else - if(CP) - update() - var/pdir = CP.dpdir - if(istype(CP, /obj/structure/disposalpipe/broken)) - pdir = CP.dir - if(pdir & dpdir) - to_chat(user, "There is already a [nicetype] at that location.") - return + for(var/obj/structure/disposalpipe/CP in T) + if(CP) + update() + var/pdir = CP.dpdir + if(istype(CP, /obj/structure/disposalpipe/broken)) + pdir = CP.dir + if(pdir & dpdir) + to_chat(user, "There is already a [nicetype] at that location.") + return if(istype(I, /obj/item/weldingtool)) if(anchored)