diff --git a/code/__DEFINES/machines.dm b/code/__DEFINES/machines.dm index f0778989601..6e4d49aad9f 100644 --- a/code/__DEFINES/machines.dm +++ b/code/__DEFINES/machines.dm @@ -128,6 +128,6 @@ #define AI_DISPLAY_MODE_BSOD 2 // Door operations -#define OPENING 1 -#define CLOSING 2 -#define MALF 3 +#define DOOR_OPENING 1 +#define DOOR_CLOSING 2 +#define DOOR_MALF 3 diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index ade1cc16c56..94e81f2d785 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -155,7 +155,7 @@ D.activate_alarm() if(D.welded) continue - if(D.operating && D.operating != CLOSING) + if(D.operating && D.operating != DOOR_CLOSING) D.nextstate = FD_CLOSED else if(!D.density) INVOKE_ASYNC(D, /obj/machinery/door/firedoor.proc/close) @@ -170,7 +170,7 @@ D.deactivate_alarm() if(D.welded) continue - if(D.operating && D.operating != OPENING) + if(D.operating && D.operating != DOOR_OPENING) D.nextstate = FD_OPEN else if(D.density) INVOKE_ASYNC(D, /obj/machinery/door/firedoor.proc/open) @@ -256,7 +256,7 @@ if(D.welded) continue // Alarm is toggled, but door stuck if(D.operating) - if((D.operating == OPENING && opening) || (D.operating == CLOSING && !opening)) + if((D.operating == DOOR_OPENING && opening) || (D.operating == DOOR_CLOSING && !opening)) continue else D.nextstate = opening ? FD_OPEN : FD_CLOSED diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 7c528469aee..137e19562c7 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1233,7 +1233,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays) if(!density) return TRUE SEND_SIGNAL(src, COMSIG_AIRLOCK_OPEN) - operating = OPENING + operating = DOOR_OPENING update_icon(AIRLOCK_OPENING, 1) sleep(1) set_opacity(0) @@ -1274,7 +1274,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays) killthis.ex_act(EXPLODE_HEAVY)//Smashin windows SEND_SIGNAL(src, COMSIG_AIRLOCK_CLOSE) - operating = CLOSING + operating = DOOR_CLOSING update_icon(AIRLOCK_CLOSING, 1) layer = CLOSED_DOOR_LAYER if(!override) @@ -1326,7 +1326,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays) /obj/machinery/door/airlock/emag_act(mob/user) if(!operating && density && arePowerSystemsOn() && !emagged) - operating = MALF + operating = DOOR_MALF update_icon(AIRLOCK_EMAG, 1) sleep(6) if(QDELETED(src)) @@ -1341,7 +1341,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays) /obj/machinery/door/airlock/cmag_act(mob/user) if(operating || HAS_TRAIT(src, TRAIT_CMAGGED) || !density || !arePowerSystemsOn()) return - operating = MALF + operating = DOOR_MALF update_icon(AIRLOCK_EMAG, 1) sleep(6) if(QDELETED(src)) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index b1d2dfcc765..0c442fd217e 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -383,7 +383,7 @@ if(operating) return SEND_SIGNAL(src, COMSIG_DOOR_OPEN) - operating = OPENING + operating = DOOR_OPENING do_animate("opening") set_opacity(0) sleep(5) @@ -413,7 +413,7 @@ return SEND_SIGNAL(src, COMSIG_DOOR_CLOSE) - operating = CLOSING + operating = DOOR_CLOSING do_animate("closing") layer = closingLayer diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 1fa09aedacd..2f48b5f461f 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -169,7 +169,7 @@ if(emagged) return 0 if(!operating) //in case of emag - operating = OPENING + operating = DOOR_OPENING do_animate("opening") set_opacity(FALSE) playsound(loc, 'sound/machines/windowdoor.ogg', 100, 1) @@ -194,7 +194,7 @@ if(forced < 2) if(emagged) return 0 - operating = CLOSING + operating = DOOR_CLOSING do_animate("closing") playsound(loc, 'sound/machines/windowdoor.ogg', 100, 1) icon_state = base_state @@ -252,7 +252,7 @@ /obj/machinery/door/window/emag_act(mob/user, obj/weapon) if(!operating && density && !emagged) emagged = TRUE - operating = MALF + operating = DOOR_MALF electronics = new /obj/item/airlock_electronics/destroyed() flick("[base_state]spark", src) playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) @@ -265,7 +265,7 @@ if(operating || !density || HAS_TRAIT(src, TRAIT_CMAGGED)) return ADD_TRAIT(src, TRAIT_CMAGGED, "clown_emag") - operating = MALF + operating = DOOR_MALF flick("[base_state]spark", src) playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) sleep(6)