Merge pull request #6829 from Citadel-Station-13/upstream-merge-37955

[MIRROR] Keep only the most recent airlock autoclose timer
This commit is contained in:
deathride58
2018-05-22 02:28:21 +00:00
committed by GitHub
2 changed files with 7 additions and 6 deletions
+3 -5
View File
@@ -1070,10 +1070,8 @@
else
playsound(src.loc, 'sound/machines/airlockforced.ogg', 30, 1)
if(autoclose && normalspeed)
addtimer(CALLBACK(src, .proc/autoclose), 150)
else if(autoclose && !normalspeed)
addtimer(CALLBACK(src, .proc/autoclose), 15)
if(autoclose)
autoclose_in(normalspeed ? 150 : 15)
if(!density)
return TRUE
@@ -1106,7 +1104,7 @@
if(safe)
for(var/atom/movable/M in get_turf(src))
if(M.density && M != src) //something is blocking the door
addtimer(CALLBACK(src, .proc/autoclose), 60)
autoclose_in(60)
return
if(forced < 2)
+4 -1
View File
@@ -274,7 +274,7 @@
for(var/atom/movable/M in get_turf(src))
if(M.density && M != src) //something is blocking the door
if(autoclose)
addtimer(CALLBACK(src, .proc/autoclose), 60)
autoclose_in(60)
return
operating = TRUE
@@ -326,6 +326,9 @@
if(!QDELETED(src) && !density && !operating && !locked && !welded && autoclose)
close()
/obj/machinery/door/proc/autoclose_in(wait)
addtimer(CALLBACK(src, .proc/autoclose), wait, TIMER_UNIQUE | TIMER_NO_HASH_WAIT | TIMER_OVERRIDE)
/obj/machinery/door/proc/requiresID()
return 1