From 211ccbe233adf0309e44df3b4adde8e3bbba3a6f Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Mon, 22 Sep 2025 13:41:26 -0400 Subject: [PATCH] Converts airlocks to have departmental based wires. (#30196) * the majority * Update code/game/area/ss13_areas/science_areas.dm Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> --------- Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Co-authored-by: warriorstar-orion --- _maps/map_files/stations/boxstation.dmm | 74 ++++++++-------- _maps/map_files/stations/cerestation.dmm | 88 +++++++++---------- _maps/map_files/stations/metastation.dmm | 52 +++++------ code/__DEFINES/wires_defines.dm | 1 + code/datums/wires/airlock_wires.dm | 47 +++++++++- code/datums/wires/wires.dm | 11 ++- code/game/area/areas.dm | 3 + code/game/area/areas/mining_areas.dm | 5 ++ code/game/area/areas/ruins/space_areas.dm | 1 + code/game/area/ss13_areas/ai_areas.dm | 2 + code/game/area/ss13_areas/command_areas.dm | 3 + .../game/area/ss13_areas/engineering_areas.dm | 1 + code/game/area/ss13_areas/legal_areas.dm | 2 + .../game/area/ss13_areas/maintenance_areas.dm | 1 + code/game/area/ss13_areas/medical_areas.dm | 1 + code/game/area/ss13_areas/procedure_areas.dm | 2 +- code/game/area/ss13_areas/science_areas.dm | 2 + code/game/area/ss13_areas/security_areas.dm | 1 + code/game/area/ss13_areas/service_areas.dm | 3 + code/game/area/ss13_areas/supply_areas.dm | 3 + code/game/machinery/doors/airlock.dm | 17 +++- code/modules/ruins/ruin_areas.dm | 1 + 22 files changed, 205 insertions(+), 116 deletions(-) diff --git a/_maps/map_files/stations/boxstation.dmm b/_maps/map_files/stations/boxstation.dmm index 66730154a33..8eee186cfc5 100644 --- a/_maps/map_files/stations/boxstation.dmm +++ b/_maps/map_files/stations/boxstation.dmm @@ -38897,7 +38897,7 @@ /obj/machinery/atmospherics/pipe/simple/visible/yellow{ dir = 10 }, -/obj/structure/lattice/catwalk, +/obj/structure/lattice, /turf/space, /area/space/nearstation) "cNF" = ( @@ -54066,7 +54066,7 @@ /obj/machinery/atmospherics/pipe/simple/visible/yellow{ dir = 9 }, -/obj/structure/lattice/catwalk, +/obj/structure/lattice, /turf/space, /area/space/nearstation) "gNX" = ( @@ -62275,20 +62275,6 @@ icon_state = "blue" }, /area/station/maintenance/aft) -"kKG" = ( -/obj/machinery/door/airlock/maintenance, -/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance, -/obj/machinery/atmospherics/pipe/simple/hidden/supply{ - dir = 4 - }, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ - dir = 8 - }, -/obj/machinery/atmospherics/pipe/simple/hidden/cyan{ - dir = 4 - }, -/turf/simulated/floor/plating, -/area/station/science/hallway) "kKJ" = ( /obj/structure/chair{ dir = 8 @@ -66542,6 +66528,13 @@ icon_state = "white" }, /area/station/science/toxins/mixing) +"mMV" = ( +/obj/machinery/atmospherics/pipe/simple/visible/yellow{ + dir = 10 + }, +/obj/structure/lattice/catwalk, +/turf/space, +/area/space/nearstation) "mNd" = ( /obj/structure/cable/yellow{ icon_state = "4-8" @@ -70959,6 +70952,20 @@ icon_state = "whitepurple" }, /area/station/science/xenobiology) +"oSB" = ( +/obj/machinery/door/airlock/maintenance, +/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance, +/obj/machinery/atmospherics/pipe/simple/hidden/supply{ + dir = 4 + }, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ + dir = 8 + }, +/obj/machinery/atmospherics/pipe/simple/hidden/cyan{ + dir = 4 + }, +/turf/simulated/floor/plating, +/area/station/maintenance/asmaint2) "oSE" = ( /obj/structure/cable{ icon_state = "1-2" @@ -72547,7 +72554,7 @@ }, /obj/effect/mapping_helpers/airlock/access/all/supply/cargo_bay, /turf/simulated/floor/plating, -/area/station/supply/warehouse) +/area/station/maintenance/port) "pIR" = ( /obj/structure/cable/extra_insulated{ icon_state = "4-8" @@ -84791,6 +84798,13 @@ icon_state = "white" }, /area/station/science/xenobiology) +"vJx" = ( +/obj/machinery/atmospherics/pipe/simple/visible/yellow{ + dir = 9 + }, +/obj/structure/lattice/catwalk, +/turf/space, +/area/space/nearstation) "vJN" = ( /obj/machinery/atmospherics/pipe/simple/hidden/cyan{ dir = 4 @@ -85705,13 +85719,6 @@ icon_state = "caution" }, /area/station/public/dorms) -"wfZ" = ( -/obj/machinery/atmospherics/pipe/simple/visible/yellow{ - dir = 9 - }, -/obj/structure/lattice, -/turf/space, -/area/space/nearstation) "wgt" = ( /obj/structure/table/wood, /obj/item/ashtray/glass, @@ -89205,13 +89212,6 @@ }, /turf/simulated/floor/plating, /area/station/maintenance/abandonedservers) -"xPT" = ( -/obj/machinery/atmospherics/pipe/simple/visible/yellow{ - dir = 10 - }, -/obj/structure/lattice, -/turf/space, -/area/space/nearstation) "xQB" = ( /obj/effect/spawner/window/reinforced/tinted, /obj/structure/disposalpipe/segment{ @@ -126269,7 +126269,7 @@ aab cQp aab cZh -cNE +mMV dba djE dcS @@ -126281,7 +126281,7 @@ djE djE djE djE -gNQ +vJx aab aab aab @@ -127573,7 +127573,7 @@ igi igi igi igi -wfZ +gNQ fPY wyD wyD @@ -127802,7 +127802,7 @@ cep cjq cep cxO -xPT +cNE igi igi igi @@ -127820,7 +127820,7 @@ igi igi igi igi -wfZ +gNQ dgS eQU eQU @@ -137570,7 +137570,7 @@ ctu cpR cpR cpR -kKG +oSB qZN qZN cBR diff --git a/_maps/map_files/stations/cerestation.dmm b/_maps/map_files/stations/cerestation.dmm index 74465b3b17a..87569fab553 100644 --- a/_maps/map_files/stations/cerestation.dmm +++ b/_maps/map_files/stations/cerestation.dmm @@ -415,6 +415,17 @@ /obj/machinery/door/firedoor, /turf/simulated/floor/plasteel, /area/station/maintenance/command/fore) +"acM" = ( +/obj/structure/cable{ + icon_state = "1-2" + }, +/obj/machinery/atmospherics/pipe/simple/hidden/supply, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, +/obj/structure/disposalpipe/segment, +/turf/simulated/floor/plasteel{ + icon_state = "neutralfull" + }, +/area/station/hallway/primary/port/north) "acO" = ( /obj/item/kirbyplants/large, /turf/simulated/floor/plasteel{ @@ -10263,21 +10274,6 @@ }, /turf/simulated/floor/engine, /area/station/engineering/control) -"bCr" = ( -/obj/machinery/door/airlock/maintenance{ - name = "Aft Asteroid Maintenance" - }, -/obj/structure/cable{ - icon_state = "1-2" - }, -/obj/machinery/atmospherics/pipe/simple/hidden/supply, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, -/obj/effect/spawner/random/dirt/frequent, -/obj/structure/disposalpipe/segment, -/obj/effect/mapping_helpers/airlock/access/any/science/tox, -/obj/effect/mapping_helpers/airlock/access/any/science/xenobio, -/turf/simulated/floor/plasteel/white, -/area/station/science/misc_lab) "bCs" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/cable/extra_insulated{ @@ -28394,7 +28390,7 @@ name = "Aft Asteroid Maintenance" }, /turf/simulated/floor/plasteel/white, -/area/station/science/xenobiology) +/area/station/maintenance/apmaint) "eFq" = ( /obj/machinery/atmospherics/unary/vent_scrubber/on, /obj/effect/spawner/random/dirt/often, @@ -45957,6 +45953,21 @@ "isI" = ( /turf/simulated/floor/plating, /area/station/maintenance/service/fore_port) +"isZ" = ( +/obj/machinery/door/airlock/maintenance{ + name = "Aft Asteroid Maintenance" + }, +/obj/structure/cable{ + icon_state = "1-2" + }, +/obj/machinery/atmospherics/pipe/simple/hidden/supply, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, +/obj/effect/spawner/random/dirt/frequent, +/obj/structure/disposalpipe/segment, +/obj/effect/mapping_helpers/airlock/access/any/science/tox, +/obj/effect/mapping_helpers/airlock/access/any/science/xenobio, +/turf/simulated/floor/plasteel/white, +/area/station/maintenance/apmaint) "itf" = ( /turf/simulated/mineral/ancient, /area/station/maintenance/starboard) @@ -63790,20 +63801,6 @@ icon_state = "asteroidplating" }, /area/station/maintenance/apmaint) -"lZs" = ( -/obj/machinery/door/airlock/maintenance{ - name = "Aft Asteroid Maintenance" - }, -/obj/machinery/atmospherics/pipe/simple/hidden/supply, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, -/obj/effect/spawner/random/dirt/frequent, -/obj/structure/cable{ - icon_state = "1-2" - }, -/obj/effect/mapping_helpers/airlock/access/any/science/xenobio, -/obj/effect/mapping_helpers/airlock/access/any/science/tox, -/turf/simulated/floor/plasteel/white, -/area/station/science/test_chamber) "lZt" = ( /obj/structure/table, /obj/item/storage/fancy/cigarettes/cigpack_robust{ @@ -69164,17 +69161,6 @@ }, /turf/simulated/floor/carpet/red, /area/station/command/office/hos) -"nnD" = ( -/obj/structure/cable{ - icon_state = "1-2" - }, -/obj/machinery/atmospherics/pipe/simple/hidden/supply, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, -/obj/structure/disposalpipe/segment, -/turf/simulated/floor/plasteel{ - icon_state = "neutralfull" - }, -/area/station/hallway/primary/port/north) "nnF" = ( /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 9 @@ -97926,6 +97912,20 @@ icon_state = "yellow" }, /area/station/maintenance/disposal/east) +"tuu" = ( +/obj/machinery/door/airlock/maintenance{ + name = "Aft Asteroid Maintenance" + }, +/obj/machinery/atmospherics/pipe/simple/hidden/supply, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, +/obj/effect/spawner/random/dirt/frequent, +/obj/structure/cable{ + icon_state = "1-2" + }, +/obj/effect/mapping_helpers/airlock/access/any/science/xenobio, +/obj/effect/mapping_helpers/airlock/access/any/science/tox, +/turf/simulated/floor/plasteel/white, +/area/station/maintenance/apmaint) "tuC" = ( /obj/machinery/atmospherics/pipe/manifold/visible/purple{ dir = 8 @@ -140119,7 +140119,7 @@ uqI sJy gIh dUE -nnD +acM nxu jag fkS @@ -142522,10 +142522,10 @@ asL czb cza oUJ -bCr +isZ eJf wpX -lZs +tuu aFn dZA oqN diff --git a/_maps/map_files/stations/metastation.dmm b/_maps/map_files/stations/metastation.dmm index b051012f024..47a3a013ae3 100644 --- a/_maps/map_files/stations/metastation.dmm +++ b/_maps/map_files/stations/metastation.dmm @@ -44777,6 +44777,31 @@ }, /turf/simulated/floor/plating, /area/station/maintenance/fpmaint) +"hRC" = ( +/obj/structure/disposalpipe/segment{ + dir = 4 + }, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ + dir = 4 + }, +/obj/machinery/atmospherics/pipe/simple/hidden/supply{ + dir = 4 + }, +/obj/machinery/door/firedoor/heavy, +/obj/machinery/door/poddoor/preopen{ + name = "toxins blast door"; + id_tag = "rdtoxins" + }, +/obj/machinery/door/airlock/research{ + name = "Toxins Test Lab" + }, +/obj/effect/mapping_helpers/airlock/access/all/science/tox, +/obj/effect/mapping_helpers/airlock/autoname, +/obj/structure/cable{ + icon_state = "4-8" + }, +/turf/simulated/floor/plasteel, +/area/station/maintenance/aft2) "hRH" = ( /obj/machinery/door/firedoor, /obj/machinery/door/airlock{ @@ -83576,31 +83601,6 @@ luminosity = 2 }, /area/station/maintenance/fore2) -"vyF" = ( -/obj/structure/disposalpipe/segment{ - dir = 4 - }, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ - dir = 4 - }, -/obj/machinery/atmospherics/pipe/simple/hidden/supply{ - dir = 4 - }, -/obj/machinery/door/firedoor/heavy, -/obj/machinery/door/poddoor/preopen{ - name = "toxins blast door"; - id_tag = "rdtoxins" - }, -/obj/machinery/door/airlock/research{ - name = "Toxins Test Lab" - }, -/obj/effect/mapping_helpers/airlock/access/all/science/tox, -/obj/effect/mapping_helpers/airlock/autoname, -/obj/structure/cable{ - icon_state = "4-8" - }, -/turf/simulated/floor/plasteel, -/area/station/science/toxins/mixing) "vyL" = ( /obj/machinery/door/firedoor, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, @@ -124645,7 +124645,7 @@ cPc bdN cOp cOp -vyF +hRC cOp qGk qGk diff --git a/code/__DEFINES/wires_defines.dm b/code/__DEFINES/wires_defines.dm index 7d267d96e95..edf7a161305 100644 --- a/code/__DEFINES/wires_defines.dm +++ b/code/__DEFINES/wires_defines.dm @@ -83,3 +83,4 @@ #define WIRE_DISABLE "Disable" #define WIRE_INTERFACE "Interface" +#define ZLVL_BASED_WIRES "Zlvl_based_wires" diff --git a/code/datums/wires/airlock_wires.dm b/code/datums/wires/airlock_wires.dm index d87cc86d2e9..caa1c9ea625 100644 --- a/code/datums/wires/airlock_wires.dm +++ b/code/datums/wires/airlock_wires.dm @@ -1,8 +1,5 @@ // Wires for airlocks -/datum/wires/airlock/secure - randomize = TRUE - /datum/wires/airlock holder_type = /obj/machinery/door/airlock wire_count = 12 // 10 actual, 2 duds. @@ -15,6 +12,50 @@ ) return ..() +/datum/wires/airlock/maint + dictionary_key = /datum/wires/airlock/maint + proper_name = "Maintenance Airlock" + +/datum/wires/airlock/command + dictionary_key = /datum/wires/airlock/command + proper_name = "Command Airlock" + +/datum/wires/airlock/service + dictionary_key = /datum/wires/airlock/service + proper_name = "Service Airlock" + +/datum/wires/airlock/security + dictionary_key = /datum/wires/airlock/security + proper_name = "Security Airlock" + +/datum/wires/airlock/engineering + dictionary_key = /datum/wires/airlock/engineering + proper_name = "Engineering Airlock" + +/datum/wires/airlock/medbay + dictionary_key = /datum/wires/airlock/medbay + proper_name = "Medbay Airlock" + +/datum/wires/airlock/science + dictionary_key = /datum/wires/airlock/science + proper_name = "Science Airlock" + +/datum/wires/airlock/ai + dictionary_key = /datum/wires/airlock/ai + proper_name = "AI Airlock" + +/datum/wires/airlock/cargo + dictionary_key = /datum/wires/airlock/cargo + proper_name = "Cargo Airlock" + +// We want ruin airlocks to be configured by zlvl. +// I don't have a good way to do this. Please send me ideas. +/datum/wires/airlock/ruin + dictionary_key = /datum/wires/airlock/ruin + +/datum/wires/airlock/secure + randomize = TRUE + /datum/wires/airlock/interactable(mob/user) var/obj/machinery/door/airlock/A = holder if(iscarbon(user) && A.Adjacent(user) && A.isElectrified() && A.shock(user, 100)) diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 1055d2fb241..3546b4290be 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -8,6 +8,8 @@ var/atom/holder /// The holder type; used to make sure that the holder is the correct type. var/holder_type + /// Key that enables wire assignments to be common across different holders. If null, will use the holder_type as a key. + var/dictionary_key = null /// The display name for the TGUI window. For example, given the var is "APC"... /// When the TGUI window is opened, "wires" will be appended to it's title, and it would become "APC wires". var/proper_name = "Unknown" @@ -41,12 +43,13 @@ if(randomize) randomize() return - - if(!GLOB.wire_color_directory[holder_type]) + // If there is a dictionary key set, we'll want to use that. Otherwise, use the holder type. + var/key = dictionary_key ? dictionary_key : holder_type + if(!GLOB.wire_color_directory[key]) randomize() - GLOB.wire_color_directory[holder_type] = colors + GLOB.wire_color_directory[key] = colors else - colors = GLOB.wire_color_directory[holder_type] + colors = GLOB.wire_color_directory[key] /datum/wires/Destroy() for(var/color in colors) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index eb7fa575a80..857acb1dec7 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -93,6 +93,9 @@ /// Turrets use this list to see if individual power/lethal settings are allowed. Contains the /obj/machinery/turretid for this area var/list/turret_controls = list() + /// Wire assignment for airlocks in this area + var/airlock_wires = /datum/wires/airlock + /// The flags applied to request consoles spawned in this area. /// See [RC_ASSIST], [RC_SUPPLY], [RC_INFO]. var/request_console_flags = 0 diff --git a/code/game/area/areas/mining_areas.dm b/code/game/area/areas/mining_areas.dm index 71fc597393a..246c42cb4f9 100644 --- a/code/game/area/areas/mining_areas.dm +++ b/code/game/area/areas/mining_areas.dm @@ -2,6 +2,7 @@ /area/mine icon_state = "mining" + airlock_wires = ZLVL_BASED_WIRES /area/mine/unexplored name = "Mine" @@ -46,6 +47,7 @@ sound_environment = SOUND_AREA_STANDARD_STATION request_console_name = "Mining Outpost" request_console_flags = RC_SUPPLY + airlock_wires = /datum/wires/airlock/cargo /area/mine/outpost/airlock name = "Mining Station Airlock" @@ -104,6 +106,7 @@ /area/mine/outpost/maintenance name = "Mining Station Maintenance" icon_state = "maintcentral" + airlock_wires = /datum/wires/airlock/maint /area/mine/outpost/maintenance/south name = "Mining Station South Maintenance" @@ -135,6 +138,7 @@ /area/mine/laborcamp name = "Labor Camp" icon_state = "brig" + airlock_wires = /datum/wires/airlock/security /area/mine/laborcamp/security name = "Labor Camp Security" @@ -147,6 +151,7 @@ /area/lavaland icon_state = "mining" sound_environment = SOUND_AREA_LAVALAND + airlock_wires = ZLVL_BASED_WIRES /area/lavaland/surface name = "Lavaland" diff --git a/code/game/area/areas/ruins/space_areas.dm b/code/game/area/areas/ruins/space_areas.dm index 5655880967c..f68d118b79f 100644 --- a/code/game/area/areas/ruins/space_areas.dm +++ b/code/game/area/areas/ruins/space_areas.dm @@ -249,6 +249,7 @@ ambientsounds = list('sound/ambience/dvorak_ambience_final.ogg') min_ambience_cooldown = 110 SECONDS // 3 seconds longer than the length of the song max_ambience_cooldown = 170 SECONDS // A minute break at most + airlock_wires = /datum/wires/airlock/secure // D.V.O.R.A.K says fuck you and has randomized all their wires. Have fun! /area/ruin/space/telecomms/powercontrol name = "\improper Telecommunications Power Control" diff --git a/code/game/area/ss13_areas/ai_areas.dm b/code/game/area/ss13_areas/ai_areas.dm index 85a420dfae3..dcd5c8dd450 100644 --- a/code/game/area/ss13_areas/ai_areas.dm +++ b/code/game/area/ss13_areas/ai_areas.dm @@ -1,6 +1,7 @@ /area/station/turret_protected ambientsounds = list('sound/ambience/ambimalf.ogg', 'sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg') + airlock_wires = /datum/wires/airlock/ai /area/station/turret_protected/ai_upload name = "\improper AI Upload Chamber" @@ -47,6 +48,7 @@ /area/station/telecomms ambientsounds = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg', 'sound/ambience/ambitech.ogg',\ 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambitech3.ogg', 'sound/ambience/ambimystery.ogg') + airlock_wires = /datum/wires/airlock/ai /area/station/telecomms/chamber name = "\improper Telecoms Central Compartment" diff --git a/code/game/area/ss13_areas/command_areas.dm b/code/game/area/ss13_areas/command_areas.dm index 0fb8b633319..dd375c3863c 100644 --- a/code/game/area/ss13_areas/command_areas.dm +++ b/code/game/area/ss13_areas/command_areas.dm @@ -1,6 +1,9 @@ //Command +/area/station/command + airlock_wires = /datum/wires/airlock/command + /area/station/command/bridge name = "\improper Bridge" icon_state = "bridge" diff --git a/code/game/area/ss13_areas/engineering_areas.dm b/code/game/area/ss13_areas/engineering_areas.dm index f7abe08f717..8c21446a728 100644 --- a/code/game/area/ss13_areas/engineering_areas.dm +++ b/code/game/area/ss13_areas/engineering_areas.dm @@ -40,6 +40,7 @@ /area/station/engineering ambientsounds = ENGINEERING_SOUNDS sound_environment = SOUND_AREA_LARGE_ENCLOSED + airlock_wires = /datum/wires/airlock/engineering /area/station/engineering/smes name = "\improper Engineering SMES" diff --git a/code/game/area/ss13_areas/legal_areas.dm b/code/game/area/ss13_areas/legal_areas.dm index 528f01cef1e..5122db218f6 100644 --- a/code/game/area/ss13_areas/legal_areas.dm +++ b/code/game/area/ss13_areas/legal_areas.dm @@ -1,3 +1,5 @@ +/area/station/legal + airlock_wires = /datum/wires/airlock/security /area/station/legal/courtroom name = "\improper Courtroom" diff --git a/code/game/area/ss13_areas/maintenance_areas.dm b/code/game/area/ss13_areas/maintenance_areas.dm index 5160cd2301f..ed0ec00f74a 100644 --- a/code/game/area/ss13_areas/maintenance_areas.dm +++ b/code/game/area/ss13_areas/maintenance_areas.dm @@ -4,6 +4,7 @@ ambientsounds = MAINTENANCE_SOUNDS valid_territory = FALSE sound_environment = SOUND_AREA_TUNNEL_ENCLOSED + airlock_wires = /datum/wires/airlock/maint /area/station/maintenance/engimaint name = "Engineering Maintenance" diff --git a/code/game/area/ss13_areas/medical_areas.dm b/code/game/area/ss13_areas/medical_areas.dm index 4c19a60597f..fda76d8013d 100644 --- a/code/game/area/ss13_areas/medical_areas.dm +++ b/code/game/area/ss13_areas/medical_areas.dm @@ -4,6 +4,7 @@ sound_environment = SOUND_AREA_STANDARD_STATION min_ambience_cooldown = 90 SECONDS max_ambience_cooldown = 180 SECONDS + airlock_wires = /datum/wires/airlock/medbay /area/station/medical/medbay name = "\improper Medbay" diff --git a/code/game/area/ss13_areas/procedure_areas.dm b/code/game/area/ss13_areas/procedure_areas.dm index 12d2e177b5b..1f83529bf73 100644 --- a/code/game/area/ss13_areas/procedure_areas.dm +++ b/code/game/area/ss13_areas/procedure_areas.dm @@ -1,4 +1,4 @@ - /area/station/procedure/trainer_office name = "\improper Trainer's Office" icon_state = "procedure_nct" + airlock_wires = /datum/wires/airlock/command // This or security diff --git a/code/game/area/ss13_areas/science_areas.dm b/code/game/area/ss13_areas/science_areas.dm index 2c2734fcbb6..beec27a9e4c 100644 --- a/code/game/area/ss13_areas/science_areas.dm +++ b/code/game/area/ss13_areas/science_areas.dm @@ -38,6 +38,7 @@ /area/station/science sound_environment = SOUND_AREA_STANDARD_STATION + airlock_wires = /datum/wires/airlock/science /area/station/science/rnd name = "Research and Development" @@ -90,6 +91,7 @@ /area/station/science/server name = "\improper Server Room" icon_state = "server" + airlock_wires = /datum/wires/airlock/command // Like every one has command doors. /area/station/science/server/coldroom name = "\improper Server Coldroom" diff --git a/code/game/area/ss13_areas/security_areas.dm b/code/game/area/ss13_areas/security_areas.dm index 2db3ce91d8d..aa385dead5f 100644 --- a/code/game/area/ss13_areas/security_areas.dm +++ b/code/game/area/ss13_areas/security_areas.dm @@ -2,6 +2,7 @@ /area/station/security ambientsounds = HIGHSEC_SOUNDS sound_environment = SOUND_AREA_STANDARD_STATION + airlock_wires = /datum/wires/airlock/security /area/station/security/main name = "\improper Security Office" diff --git a/code/game/area/ss13_areas/service_areas.dm b/code/game/area/ss13_areas/service_areas.dm index 90b46c7942c..d59bf1a2126 100644 --- a/code/game/area/ss13_areas/service_areas.dm +++ b/code/game/area/ss13_areas/service_areas.dm @@ -1,3 +1,6 @@ +/area/station/service + airlock_wires = /datum/wires/airlock/service + /area/station/service/cafeteria name = "\improper Cafe" icon_state = "cafeteria" diff --git a/code/game/area/ss13_areas/supply_areas.dm b/code/game/area/ss13_areas/supply_areas.dm index cb22786119b..15200d4f31e 100644 --- a/code/game/area/ss13_areas/supply_areas.dm +++ b/code/game/area/ss13_areas/supply_areas.dm @@ -3,6 +3,7 @@ name = "\improper Quartermasters" icon_state = "quart" sound_environment = SOUND_AREA_STANDARD_STATION + airlock_wires = /datum/wires/airlock/cargo /area/station/supply/lobby name = "\improper Cargo Lobby" @@ -38,12 +39,14 @@ name = "Smith's Office" icon_state = "smith" +// this should really be command/office/cmo /area/station/supply/qm name = "\improper Quartermaster's Office" icon_state = "qm" request_console_flags = RC_ASSIST | RC_INFO request_console_name = "Quartermaster's Desk" request_console_announces = TRUE + airlock_wires = /datum/wires/airlock/command /area/station/supply/miningdock name = "\improper Mining Dock" diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 42509fd4730..aa3cd014c22 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -146,7 +146,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays) * one wire for controlling door speed. When active, dor closes at normal rate. When cut, door does not close manually. When pulsed, door attempts to close every tick. */ // You can find code for the airlock wires in the wire datum folder. - wires = new(src) + wires = get_wires() if(closeOtherId != null) addtimer(CALLBACK(src, PROC_REF(update_other_id)), 5) @@ -166,6 +166,21 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays) diag_hud.add_to_hud(src) diag_hud_set_electrified() +/** + * Generates the airlock's wire layout based on the current area the airlock resides in. + * + * Returns a new /datum/wires/ with the appropriate wire layout based on the airlock_wires + * of the area the airlock is in. + */ +/obj/machinery/door/airlock/proc/get_wires() + var/area/source_area = get_area(src) + if(!source_area || !z) + return new /datum/wires/airlock(src) + if(source_area.airlock_wires == ZLVL_BASED_WIRES) + var/snowflake_path = /datum/wires/airlock/ruin + return new snowflake_path(src) + return source_area?.airlock_wires ? new source_area.airlock_wires(src) : new /datum/wires/airlock(src) + /obj/machinery/door/airlock/proc/update_other_id() for(var/obj/machinery/door/airlock/A in GLOB.airlocks) if(A.closeOtherId == closeOtherId && A != src) diff --git a/code/modules/ruins/ruin_areas.dm b/code/modules/ruins/ruin_areas.dm index be8323edd9f..c574e6fa356 100644 --- a/code/modules/ruins/ruin_areas.dm +++ b/code/modules/ruins/ruin_areas.dm @@ -15,6 +15,7 @@ GLOBAL_LIST_INIT(ruin_prototypes, list(/area/ruin, dynamic_lighting = DYNAMIC_LIGHTING_FORCED ambientsounds = RUINS_SOUNDS sound_environment = SOUND_ENVIRONMENT_STONEROOM + airlock_wires = ZLVL_BASED_WIRES /area/ruin/unpowered