Merge pull request #4035 from Citadel-Station-13/upstream-merge-32892

[MIRROR] Fixes two bugs in disposals
This commit is contained in:
deathride58
2017-11-20 19:05:23 +00:00
committed by GitHub
3 changed files with 6 additions and 3 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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)