diff --git a/code/game/machinery/doors/_door.dm b/code/game/machinery/doors/_door.dm index 60fd6d4c053..693f2565fe9 100644 --- a/code/game/machinery/doors/_door.dm +++ b/code/game/machinery/doors/_door.dm @@ -50,6 +50,9 @@ atmos_canpass = CANPASS_PROC var/set_dir_on_update = TRUE + var/begins_closed = TRUE + var/icon_state_open = "door0" + var/icon_state_closed = "door1" /obj/machinery/door/proc/can_operate(var/mob/user) . = istype(user) && !user.restrained() && (!issmall(user) || ishuman(user) || issilicon(user) || isbot(user)) @@ -69,6 +72,13 @@ if(!populate_parts) inherit_from_assembly(assembly) set_extension(src, /datum/extension/penetration, /datum/extension/penetration/proc_call, .proc/CheckPenetration) + + if(!begins_closed) + icon_state = icon_state_open + set_density(FALSE) + set_opacity(FALSE) + layer = open_layer + ..() . = INITIALIZE_HINT_LATELOAD @@ -379,9 +389,9 @@ /obj/machinery/door/on_update_icon() if(density) - icon_state = "door1" + icon_state = icon_state_closed else - icon_state = "door0" + icon_state = icon_state_open SSradiation.resistance_cache.Remove(get_turf(src)) @@ -412,7 +422,7 @@ operating = 1 do_animate("opening") - icon_state = "door0" + icon_state = icon_state_open set_opacity(FALSE) sleep(0.5 SECONDS) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 790e7a1a30e..e3aae98d10d 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -23,6 +23,9 @@ var/global/list/airlock_overlays = list() base_type = /obj/machinery/door/airlock frame_type = /obj/structure/door_assembly + icon_state_open = "open" + icon_state_closed = "closed" + var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in. var/hackProof = 0 // if 1, this door can't be hacked by the AI var/electrified_until = 0 //World time when the door is no longer electrified. -1 if it is permanently electrified until someone fixes it. @@ -300,15 +303,15 @@ About the new airlock wires panel: switch(state) if(0) if(density) - icon_state = "closed" + icon_state = icon_state_closed state = AIRLOCK_CLOSED else - icon_state = "open" + icon_state = icon_state_open state = AIRLOCK_OPEN if(AIRLOCK_OPEN) - icon_state = "open" + icon_state = icon_state_open if(AIRLOCK_CLOSED) - icon_state = "closed" + icon_state = icon_state_closed if(AIRLOCK_OPENING, AIRLOCK_CLOSING, AIRLOCK_EMAG, AIRLOCK_DENY) icon_state = "" @@ -986,6 +989,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/Initialize(var/mapload, var/d, var/populate_parts = TRUE, obj/structure/door_assembly/assembly = null) . = ..() + //wires var/turf/T = get_turf(loc) if(T && isAdminLevel(T.z)) @@ -1003,6 +1007,8 @@ About the new airlock wires panel: if(brace.electronics) brace.req_access = get_req_access() queue_icon_update() + else if(!begins_closed) + queue_icon_update() if (glass) paintable |= PAINT_WINDOW_PAINTABLE diff --git a/code/game/machinery/doors/airlock_subtypes.dm b/code/game/machinery/doors/airlock_subtypes.dm index bb5900f7337..3f319588f48 100644 --- a/code/game/machinery/doors/airlock_subtypes.dm +++ b/code/game/machinery/doors/airlock_subtypes.dm @@ -20,12 +20,7 @@ /obj/machinery/door/airlock/medical/open icon_state = "open" - -/obj/machinery/door/airlock/medical/open/Initialize() - set_density(FALSE) - set_opacity(FALSE) - layer = open_layer - return ..() + begins_closed = FALSE /obj/machinery/door/airlock/virology door_color = COLOR_WHITE @@ -154,6 +149,10 @@ /decl/stock_part_preset/radio/event_transmitter/airlock/external_air = 1 ) +/obj/machinery/door/airlock/external/open + icon_state = "open" + begins_closed = FALSE + /obj/machinery/door/airlock/external/get_auto_access() . = ..() var/area/A = get_area(src) diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index 2e0480e9550..2e100cff8e8 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -15,9 +15,9 @@ can_open_manually = FALSE // Icon states for different shutter types. Simply change this instead of rewriting the update_icon proc. - var/icon_state_open = null + icon_state_open = null + icon_state_closed = null var/icon_state_opening = null - var/icon_state_closed = null var/icon_state_closing = null var/icon_state_open_broken = null @@ -36,7 +36,6 @@ //turning this off prevents awkward zone geometry in places like medbay lobby, for example. block_air_zones = 0 - var/begins_closed = TRUE var/decl/material/implicit_material autoset_access = FALSE // Uses different system with buttons. pry_mod = 1.35 @@ -55,15 +54,8 @@ base_type = /obj/machinery/door/blast /obj/machinery/door/blast/Initialize() - . = ..() - - if(!begins_closed) - icon_state = icon_state_open - set_density(0) - set_opacity(0) - layer = open_layer - implicit_material = GET_DECL(/decl/material/solid/metal/plasteel) + . = ..() /obj/machinery/door/blast/examine(mob/user) . = ..()