anchor.diff:  	if (stat & (NOPOWER|BROKEN))
   		return
   	if (src.timing)
  -		if (src.time > 0)
  -			src.time--
  -		else
  +		if (world.time > src.releasetime)
   			src.opendoor() // open doors, reset timer, clear status screen
  -			src.time = 0
   			src.timing = 0
  -		src.updateDialog()
  +		src.updateUsrDialog()
   		src.update_icon()
   	else
  -		if(targetdoor && targetdoor.density) //door searching cicle moved to New()
  -			spawn( 0 )
  -				targetdoor.open()
  +		opendoor()
   	return
   
   // has the door power sitatuation changed, if so update icon.
   /obj/machinery/door_timer/power_change()
  +	..()
   	update_icon()
   
   // open/closedoor checks if door_timer has power, if so it checks if the
  
positive.code: 
  //Function for using door_timer dialog input, checks if user has permission
  // href_list to
  //  "time" turns on timer
  //  "tp" value to modify timer
  //  "fc" activates flasher
  // Also updates dialog window and timer icon
  /obj/machinery/door_timer/Topic(href, href_list)
  	if(..())
  		return
  	if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
  		usr.machine = src
  		if (href_list["time"])
  			if(src.allowed(usr))
  				src.timing = text2num(href_list["time"])
  				src.closedoor()
  		else
  			if (href_list["tp"])  //adjust timer, close door if not already closed
  				if(src.allowed(usr))
  					var/tp = text2num(href_list["tp"])
  					src.time += tp
  					src.time = min(max(round(src.time), 0), 600)
  					src.timing = 1
  					src.closedoor()
  			if (href_list["fc"])
  				if(src.allowed(usr))
  					for (var/obj/machinery/flasher/F in targetflashers)
  						F.flash()
  		src.add_fingerprint(usr)
  		src.updateUsrDialog()
  		src.update_icon()
  	if (!src.timing) // was a timer set? if not, open door.
  		src.opendoor()
  	return
  
  
negative.code: 	anchored = 1.0    		// can't pick it up
  	density = 0       		// can walk through it.
  	var/id = null     		// id of door it controls.
  	var/releasetime = 0		// when world.time reaches it - release the prisoneer
  	var/timing = 1    		// boolean, true/1 timer is on, false/0 means it's not timing
  	var/childproof = 0		// boolean, when activating the door controls, locks door for 1 minute
  	var/picture_state		// icon_state of alert picture, if not displaying text/numbers
  	var/list/obj/machinery/door/window/brigdoor/targetdoors = new
  	var/list/obj/machinery/flasher/targetflashers = new
  
  /obj/machinery/door_timer/New()
  	..()
  	for(var/obj/machinery/door/window/brigdoor/M in world)
  		if (M.id == src.id)
  			targetdoors += M
  			break
  	if (targetdoors.len==0)
  		stat |= BROKEN
  	targetflashers = list()
  	for(var/obj/machinery/flasher/F in world)
  		if(F.id == src.id)
  			targetflashers += F
  	update_icon()
  
  //Main door timer loop, if it's timing and time is >0 reduce time by 1.
  // if it's less than 0, open door, reset timer
  