From 0fa731cec03af1e55cc6e73569b5e864cc2270d0 Mon Sep 17 00:00:00 2001 From: ACCount Date: Mon, 20 Nov 2017 11:46:41 +0300 Subject: [PATCH 1/2] Fixes two refactor-caused bugs in disposals (#32892) --- code/modules/recycling/disposal/bin.dm | 2 ++ code/modules/recycling/disposal/outlet.dm | 3 ++- code/modules/recycling/disposal/pipe.dm | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index 67aada1c2a..75453d0333 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -213,6 +213,8 @@ // called when holder is expelled from a disposal /obj/machinery/disposal/proc/expel(obj/structure/disposalholder/H) + H.active = FALSE + var/turf/T = get_turf(src) var/turf/target playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0) diff --git a/code/modules/recycling/disposal/outlet.dm b/code/modules/recycling/disposal/outlet.dm index 9351494cd5..8385d22d56 100644 --- a/code/modules/recycling/disposal/outlet.dm +++ b/code/modules/recycling/disposal/outlet.dm @@ -11,7 +11,7 @@ var/obj/structure/disposalpipe/trunk/trunk // the attached pipe trunk var/obj/structure/disposalconstruct/stored var/start_eject = 0 - var/eject_range = 3 + var/eject_range = 2 /obj/structure/disposaloutlet/Initialize(mapload, obj/structure/disposalconstruct/make_from) . = ..() @@ -42,6 +42,7 @@ // expel the contents of the holder object, then delete it // called when the holder exits the outlet /obj/structure/disposaloutlet/proc/expel(obj/structure/disposalholder/H) + H.active = FALSE flick("outlet-open", src) if((start_eject + 30) < world.time) start_eject = world.time diff --git a/code/modules/recycling/disposal/pipe.dm b/code/modules/recycling/disposal/pipe.dm index b213b121f6..28eefde453 100644 --- a/code/modules/recycling/disposal/pipe.dm +++ b/code/modules/recycling/disposal/pipe.dm @@ -288,8 +288,8 @@ else var/obj/machinery/disposal/D = linked D.expel(H) // expel at disposal - else - expel(H, get_turf(src), 0) // expel at turf + + // Returning null without expelling holder makes the holder expell itself return null /obj/structure/disposalpipe/trunk/nextdir(obj/structure/disposalholder/H)