mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 20:13:45 +01:00
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 <orion@snowfrost.garden>
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user