anchor.diff:  	density = 0
   	icon = 'icons/obj/atmospherics/pipes/trapdoor.dmi'
   	icon_state = "closed"
  -	mode = 0 // the chute doesn't need charging and always works
  +	mode = 0 // the trapdoor doesn't need charging and always works
   	layer = 2.01
  -	var/trap_door_state = 1
  -	var/trap_closed = 1
   	var/id = 1
   	var/auto_close = 1200
   	var/sound_open = 'sound/machines/blast_door.ogg'
   	var/sound_close = 'sound/machines/blast_door.ogg'
  -	var/operating = 0
  -
  -/obj/machinery/disposal/trapdoor/process()
  -	..()
  -	if(trap_door_state != trap_closed)
  -		switch(trap_door_state)
  -			if(0)
  -				open()
  -			if(1)
  -				trap_flush()
  -		return
  +	var/open = FALSE
  +	var/trap_door_state = 0
   
   /obj/machinery/disposal/trapdoor/proc/open()
  -	if(operating)
  -		return
  -	if(!trap_closed)
  -		return
  -
  -	operating = 1
  +	if(flushing)
  +		return
  +	if(open)
  +		return
   	flick("opening", src)
   	icon_state = "open"
   	playsound(src.loc, sound_open, 100, 1)
  -	sleep(5)
  -	trap_closed = 0
  -	sleep(5)
  -	operating = 0
  -	if(auto_close)
  -		spawn(auto_close)
  -		trap_flush()
  +	open = TRUE
  +	return 1
  +
  +
  +/obj/machinery/disposal/trapdoor/proc/close()
  +	if(open)
  +		flick("closing", src)
  +		icon_state = "closed"
  +		playsound(src.loc, sound_open, 100, 1)
  +		open = FALSE
   		return 1
  -
  -
  -/obj/machinery/disposal/trapdoor/proc/close()
  -	if(operating)
  -		return
  -	if(trap_closed)
  -		return
  -
  -	operating = 1
  -	flick("closing", src)
  -	icon_state = "closed"
  -	playsound(src.loc, sound_open, 100, 1)
  -	sleep(5)
  -	trap_closed = 1
  -	sleep(5)
  -	operating = 0
  -	trap_door_state = 1
   
   /obj/machinery/disposal/trapdoor/New(loc,var/obj/structure/disposalconstruct/make_from)
   	..()
  
positive.code: 		target.loc = src
  		if(user == target)
  			user.visible_message("[user] dives into [src].", \
  									"<span class='notice'>You dive into [src].</span>")
  		else
  			target.visible_message("<span class='danger'>[user] has pushed [target] in [src].</span>", \
  									"<span class='userdanger'>[user] has pushedd [target] in [src].</span>")
  			add_logs(user, target, "pushed", addition="into [src]")
  		update()
  		sleep(5)
  		trap_flush()
  
  /obj/machinery/disposal/trapdoor/proc/trap_flush()
  	flushing = 1
  	flushAnimation()
  	sleep(10)
  	if(last_sound < world.time + 1)
  		playsound(src, 'sound/machines/disposalflush.ogg', 50, 0, 0)
  		last_sound = world.time
  
negative.code: 	H.init(src)
  	air_contents = new()
  	H.start(src)
  	flushing = FALSE
  	sleep(5)
  
  /atom/movable/proc/disposalEnterTry()
  	return 1
  