From fc5cf12523d941604727a1cc8354a16138b55032 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Thu, 25 Jan 2018 22:49:11 -0500 Subject: [PATCH 1/2] Merge pull request #34891 from YPOQ/closesoundfix Fixes airlocks playing closing sound while already closed --- code/game/machinery/doors/airlock.dm | 4 ++-- code/game/machinery/doors/door.dm | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index c932c329dd..1945187194 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1087,6 +1087,8 @@ /obj/machinery/door/airlock/close(forced=0) if(operating || welded || locked) return + if(density) + return TRUE if(!forced) if(!hasPower() || wires.is_cut(WIRE_BOLTS)) return @@ -1108,8 +1110,6 @@ if(killthis) killthis.ex_act(EXPLODE_HEAVY)//Smashin windows - if(density) - return TRUE operating = TRUE update_icon(AIRLOCK_CLOSING, 1) layer = CLOSED_DOOR_LAYER diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 85ec73cdc6..4dc4d6887b 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -268,10 +268,8 @@ /obj/machinery/door/proc/close() if(density) - return 1 - if(operating) - return - if(welded) + return TRUE + if(operating || welded) return if(safe) for(var/atom/movable/M in get_turf(src))