From 280373489ba120cd1ed02a7797407db7e8771e07 Mon Sep 17 00:00:00 2001 From: duncathan Date: Thu, 16 Jul 2015 03:34:18 -0600 Subject: [PATCH] fixes things per aran's request --- TODO.txt | 2 -- .../components/binary_devices/circulator.dm | 4 +-- .../components/binary_devices/dp_vent_pump.dm | 16 ++++++---- .../components/binary_devices/passive_gate.dm | 4 +-- .../components/binary_devices/pump.dm | 4 +-- .../components/binary_devices/valve.dm | 3 +- .../components/binary_devices/volume_pump.dm | 6 ++-- .../components/components_base.dm | 30 +++++++++++++------ .../components/trinary_devices/filter.dm | 12 ++++---- .../components/trinary_devices/mixer.dm | 24 ++++++++------- .../components/unary_devices/Freezer.dm | 4 +-- .../components/unary_devices/cold_sink.dm | 4 +-- .../components/unary_devices/cryo.dm | 14 ++++----- .../unary_devices/generator_input.dm | 4 +-- .../unary_devices/heat_exchanger.dm | 8 ++--- .../components/unary_devices/heat_source.dm | 4 +-- .../unary_devices/outlet_injector.dm | 8 ++--- .../unary_devices/oxygen_generator.dm | 9 +++--- .../components/unary_devices/tank.dm | 12 ++++---- .../components/unary_devices/unary_base.dm | 6 ++-- .../components/unary_devices/vent_pump.dm | 8 ++--- .../components/unary_devices/vent_scrubber.dm | 12 ++++---- 22 files changed, 109 insertions(+), 89 deletions(-) delete mode 100644 TODO.txt diff --git a/TODO.txt b/TODO.txt deleted file mode 100644 index 1187050192d..00000000000 --- a/TODO.txt +++ /dev/null @@ -1,2 +0,0 @@ -make air flow - likely an issue with multiple devices' process_atmos procs; who knows \ No newline at end of file diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm index 403a49ab00b..f5da3152aae 100644 --- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm +++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm @@ -18,8 +18,8 @@ /obj/machinery/atmospherics/components/binary/circulator/proc/return_transfer_air() - var/datum/gas_mixture/air1 = airs["a1"] - var/datum/gas_mixture/air2 = airs["a2"] + var/datum/gas_mixture/air1 = airs[AIR1] + var/datum/gas_mixture/air2 = airs[AIR2] var/output_starting_pressure = air1.return_pressure() var/input_starting_pressure = air2.return_pressure() diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm index e9adc87ad1a..0064bad9fe5 100644 --- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm @@ -42,8 +42,10 @@ Acts like a normal vent, but has an input AND output. /obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/New() ..() - var/datum/gas_mixture/air1 = airs["a1"] ; air1.volume = 1000 - var/datum/gas_mixture/air2 = airs["a2"] ; air2.volume = 1000 + var/datum/gas_mixture/air1 = airs[AIR1] + var/datum/gas_mixture/air2 = airs[AIR2] + air1.volume = 1000 + air2.volume = 1000 /obj/machinery/atmospherics/components/binary/dp_vent_pump/update_icon_nopipes() overlays.Cut() @@ -64,8 +66,8 @@ Acts like a normal vent, but has an input AND output. if(!on) return 0 - var/datum/gas_mixture/air1 = airs["a1"] - var/datum/gas_mixture/air2 = airs["a2"] + var/datum/gas_mixture/air1 = airs[AIR1] + var/datum/gas_mixture/air2 = airs[AIR2] var/datum/gas_mixture/environment = loc.return_air() var/environment_pressure = environment.return_pressure() @@ -87,7 +89,8 @@ Acts like a normal vent, but has an input AND output. loc.assume_air(removed) air_update_turf() - var/datum/pipeline/parent1 = parents["p1"] ; parent1.update = 1 + var/datum/pipeline/parent1 = parents[PARENT1] + parent1.update = 1 else //external -> output var/pressure_delta = 10000 @@ -106,7 +109,8 @@ Acts like a normal vent, but has an input AND output. air2.merge(removed) air_update_turf() - var/datum/pipeline/parent2 = parents["p2"] ; parent2.update = 1 + var/datum/pipeline/parent2 = parents[PARENT2] + parent2.update = 1 return 1 diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index d7626277dba..d7005553973 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -40,8 +40,8 @@ Passive gate is similar to the regular pump except: if(!on) return 0 - var/datum/gas_mixture/air1 = airs["a1"] - var/datum/gas_mixture/air2 = airs["a2"] + var/datum/gas_mixture/air1 = airs[AIR1] + var/datum/gas_mixture/air2 = airs[AIR2] var/output_starting_pressure = air2.return_pressure() var/input_starting_pressure = air1.return_pressure() diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 457b8784672..92c36696cc0 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -48,8 +48,8 @@ Thus, the two variables affect pump operation are set in New(): if(!on) return 0 - var/datum/gas_mixture/air1 = airs["a1"] - var/datum/gas_mixture/air2 = airs["a2"] + var/datum/gas_mixture/air1 = airs[AIR1] + var/datum/gas_mixture/air2 = airs[AIR2] var/output_starting_pressure = air2.return_pressure() diff --git a/code/ATMOSPHERICS/components/binary_devices/valve.dm b/code/ATMOSPHERICS/components/binary_devices/valve.dm index 81783404ac8..3239d3a6ec4 100644 --- a/code/ATMOSPHERICS/components/binary_devices/valve.dm +++ b/code/ATMOSPHERICS/components/binary_devices/valve.dm @@ -28,7 +28,8 @@ It's like a regular ol' straight pipe, but you can turn it on and off. open = 1 update_icon_nopipes() update_parents() - var/datum/pipeline/parent1 = parents["p1"] ; parent1.reconcile_air() + var/datum/pipeline/parent1 = parents[PARENT1] + parent1.reconcile_air() investigate_log("was opened by [usr ? key_name(usr) : "a remote signal"]", "atmos") /obj/machinery/atmospherics/components/binary/valve/proc/close() diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm index 6d41f7ea062..df9fa68fae2 100644 --- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm @@ -48,8 +48,8 @@ Thus, the two variables affect pump operation are set in New(): if(!on) return 0 - var/datum/gas_mixture/air1 = airs["a1"] - var/datum/gas_mixture/air2 = airs["a2"] + var/datum/gas_mixture/air1 = airs[AIR1] + var/datum/gas_mixture/air2 = airs[AIR2] // Pump mechanism just won't do anything if the pressure is too high/too low @@ -125,7 +125,7 @@ Thus, the two variables affect pump operation are set in New(): on = !on if("set_transfer_rate" in signal.data) - var/datum/gas_mixture/air1 = airs["a1"] + var/datum/gas_mixture/air1 = airs[AIR1] transfer_rate = Clamp( text2num(signal.data["set_transfer_rate"]), 0, diff --git a/code/ATMOSPHERICS/components/components_base.dm b/code/ATMOSPHERICS/components/components_base.dm index a096a58d519..d0326540320 100644 --- a/code/ATMOSPHERICS/components/components_base.dm +++ b/code/ATMOSPHERICS/components/components_base.dm @@ -7,19 +7,31 @@ On top of that, now people can add component-speciic procs/vars if they want! #define BINARY 2 #define TRINARY 3 +#define AIR1 "a1" +#define AIR2 "a2" +#define AIR3 "a3" + +#define PARENT1 "p1" +#define PARENT2 "p2" +#define PARENT3 "p3" + +#define NODE1 "n1" +#define NODE2 "n2" +#define NODE3 "n3" + /obj/machinery/atmospherics/components/ var/welded = 0 //Used on pumps and scrubbers var/showpipe = 0 - var/list/obj/machinery/atmospherics/nodes = list() - var/list/datum/pipeline/parents = list() - var/list/datum/gas_mixture/airs = list() - - var/device_type //used for initialization stuff + var/device_type = 0//used for initialization stuff //UNARY = 1 //BINARY = 2 //TRINARY = 3 + var/list/obj/machinery/atmospherics/nodes = list() + var/list/datum/pipeline/parents = list() + var/list/datum/gas_mixture/airs = list() + /obj/machinery/atmospherics/components/New() ..() for(var/I = 1; I <= device_type; I++) @@ -156,15 +168,15 @@ Pipenet stuff; housekeeping var/datum/gas_mixture/environment = T.return_air() var/lost = null var/times_lost = 0 - for(var/A = 1; A <= device_type; A++) - var/datum/gas_mixture/air = airs["a[A]"] + for(var/I = 1; I <= device_type; I++) + var/datum/gas_mixture/air = airs["a[I]"] lost += pressures*environment.volume/(air.temperature * R_IDEAL_GAS_EQUATION) times_lost++ var/shared_loss = lost/times_lost var/datum/gas_mixture/to_release - for(var/A = 1; A <= device_type; A++) - var/datum/gas_mixture/air = airs["a[A]"] + for(var/I = 1; I <= device_type; I++) + var/datum/gas_mixture/air = airs["a[I]"] if(!to_release) to_release = air.remove(shared_loss) continue diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index 6c43ba705f8..70a9748c9bb 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -28,7 +28,7 @@ Filter types: 1: Oxygen: Oxygen ONLY 2: Nitrogen: Nitrogen ONLY 3: Carbon Dioxide: Carbon Dioxide ONLY - 4: Sleeping Agent (N2O) + 4: Sleeping Agent (NODE2O) */ var/frequency = 0 @@ -62,7 +62,7 @@ Filter types: /obj/machinery/atmospherics/components/trinary/filter/update_icon_nopipes() - if(!(stat & NOPOWER) && on && nodes["n1"] && nodes["n2"] && nodes["n3"]) + if(!(stat & NOPOWER) && on && nodes[NODE1] && nodes[NODE2] && nodes[NODE3]) icon_state = "filter_on[flipped?"_f":""]" return @@ -80,12 +80,12 @@ Filter types: ..() if(!on) return 0 - if(!(nodes["n1"] && nodes["n2"] && nodes["n3"])) + if(!(nodes[NODE1] && nodes[NODE2] && nodes[NODE3])) return 0 - var/datum/gas_mixture/air1 = airs["a1"] - var/datum/gas_mixture/air2 = airs["a2"] - var/datum/gas_mixture/air3 = airs["a3"] + var/datum/gas_mixture/air1 = airs[AIR1] + var/datum/gas_mixture/air2 = airs[AIR2] + var/datum/gas_mixture/air3 = airs[AIR3] var/output_starting_pressure = air3.return_pressure() diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index e9e42e51d28..567ccc953fb 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -32,7 +32,7 @@ ..() /obj/machinery/atmospherics/components/trinary/mixer/update_icon_nopipes() - if(!(stat & NOPOWER) && on && nodes["n1"] && nodes["n2"] && nodes["n3"]) + if(!(stat & NOPOWER) && on && nodes[NODE1] && nodes[NODE2] && nodes[NODE3]) icon_state = "mixer_on[flipped?"_f":""]" return @@ -48,19 +48,20 @@ /obj/machinery/atmospherics/components/trinary/mixer/New() ..() - var/datum/gas_mixture/air3 = airs["a3"] ; air3.volume = 300 - airs["a3"] = air3 + var/datum/gas_mixture/air3 = airs[AIR3] + air3.volume = 300 + airs[AIR3] = air3 /obj/machinery/atmospherics/components/trinary/mixer/process_atmos() ..() if(!on) return 0 - if(!(nodes["n1"] && nodes["n2"] && nodes["n3"])) + if(!(nodes[NODE1] && nodes[NODE2] && nodes[NODE3])) return 0 - var/datum/gas_mixture/air1 = airs["a1"] - var/datum/gas_mixture/air2 = airs["a2"] - var/datum/gas_mixture/air3 = airs["a3"] + var/datum/gas_mixture/air1 = airs[AIR1] + var/datum/gas_mixture/air2 = airs[AIR2] + var/datum/gas_mixture/air3 = airs[AIR3] var/output_starting_pressure = air3.return_pressure() @@ -106,12 +107,15 @@ air3.merge(removed2) if(transfer_moles1) - var/datum/pipeline/parent1 = parents["p1"] ; parent1.update = 1 + var/datum/pipeline/parent1 = parents[PARENT1] + parent1.update = 1 if(transfer_moles2) - var/datum/pipeline/parent2 = parents["p2"] ; parent2.update = 1 + var/datum/pipeline/parent2 = parents[PARENT2] + parent2.update = 1 - var/datum/pipeline/parent3 = parents["p3"] ; parent3.update = 1 + var/datum/pipeline/parent3 = parents[PARENT3] + parent3.update = 1 return 1 diff --git a/code/ATMOSPHERICS/components/unary_devices/Freezer.dm b/code/ATMOSPHERICS/components/unary_devices/Freezer.dm index 025e5418735..187af539a37 100644 --- a/code/ATMOSPHERICS/components/unary_devices/Freezer.dm +++ b/code/ATMOSPHERICS/components/unary_devices/Freezer.dm @@ -69,7 +69,7 @@ /obj/machinery/atmospherics/components/unary/cold_sink/freezer/interact(mob/user) if(stat & (NOPOWER|BROKEN)) return - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] user.set_machine(src) var/temp_text = "" if(air_contents.temperature > (T0C - 20)) @@ -194,7 +194,7 @@ return interact(user) /obj/machinery/atmospherics/components/unary/heat_reservoir/heater/interact(mob/user) - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] if(stat & (NOPOWER|BROKEN)) return diff --git a/code/ATMOSPHERICS/components/unary_devices/cold_sink.dm b/code/ATMOSPHERICS/components/unary_devices/cold_sink.dm index 7cfbd6a9f06..7750a7c7b14 100644 --- a/code/ATMOSPHERICS/components/unary_devices/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary_devices/cold_sink.dm @@ -16,7 +16,7 @@ if(showpipe) overlays += getpipeimage('icons/obj/atmospherics/components/unary_devices.dmi', "scrub_cap", initialize_directions) //scrub_cap works for now - if(!nodes["n1"] || !on || stat & (NOPOWER|BROKEN)) + if(!nodes[NODE1] || !on || stat & (NOPOWER|BROKEN)) icon_state = "cold_off" return @@ -27,7 +27,7 @@ ..() if(!on) return 0 - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] var/air_heat_capacity = air_contents.heat_capacity() var/combined_heat_capacity = current_heat_capacity + air_heat_capacity diff --git a/code/ATMOSPHERICS/components/unary_devices/cryo.dm b/code/ATMOSPHERICS/components/unary_devices/cryo.dm index bcacd991678..0f3906d31b8 100644 --- a/code/ATMOSPHERICS/components/unary_devices/cryo.dm +++ b/code/ATMOSPHERICS/components/unary_devices/cryo.dm @@ -47,7 +47,7 @@ ..() /obj/machinery/atmospherics/components/unary/cryo_cell/process_atmos() ..() - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] if(air_contents) temperature_archived = air_contents.temperature @@ -62,14 +62,14 @@ on = 0 open_machine() playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - if(!nodes["n1"] || !is_operational()) + if(!nodes[NODE1] || !is_operational()) return if(!on) updateDialog() return - if(airs["a1"]) + if(airs[AIR1]) if (occupant) process_occupant() expel_gas() @@ -146,7 +146,7 @@ /obj/machinery/atmospherics/components/unary/cryo_cell/get_ui_data() // this is the data which will be sent to the ui - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] var/data = list() data["isOperating"] = on @@ -290,7 +290,7 @@ update_icon() /obj/machinery/atmospherics/components/unary/cryo_cell/proc/process_occupant() - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] if(air_contents.total_moles() < 10) return if(occupant) @@ -322,7 +322,7 @@ /obj/machinery/atmospherics/components/unary/cryo_cell/proc/heat_gas_contents() - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] if(air_contents.total_moles() < 1) return @@ -333,7 +333,7 @@ air_contents.temperature = combined_energy/combined_heat_capacity /obj/machinery/atmospherics/components/unary/cryo_cell/proc/expel_gas() - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] if(air_contents.total_moles() < 1) return diff --git a/code/ATMOSPHERICS/components/unary_devices/generator_input.dm b/code/ATMOSPHERICS/components/unary_devices/generator_input.dm index 987d5e53a74..20d1474ffd3 100644 --- a/code/ATMOSPHERICS/components/unary_devices/generator_input.dm +++ b/code/ATMOSPHERICS/components/unary_devices/generator_input.dm @@ -9,7 +9,7 @@ var/update_cycle /obj/machinery/atmospherics/components/unary/generator_input/update_icon() - if(nodes["n1"]) + if(nodes[NODE1]) icon_state = "intact" else icon_state = "exposed" @@ -17,4 +17,4 @@ return /obj/machinery/atmospherics/components/unary/generator_input/proc/return_exchange_air() - return airs["a1"] + return airs[AIR1] diff --git a/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm index ec744484425..21746bc4e97 100644 --- a/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm +++ b/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm @@ -11,9 +11,9 @@ var/update_cycle /obj/machinery/atmospherics/components/unary/heat_exchanger/update_icon() - if(nodes["n1"]) + if(nodes[NODE1]) icon_state = "he_intact" - var/obj/machinery/atmospherics/node = nodes["n1"] + var/obj/machinery/atmospherics/node = nodes[NODE1] color = node.color else icon_state = "he_exposed" @@ -43,8 +43,8 @@ update_cycle = SSair.times_fired partner.update_cycle = SSair.times_fired - var/datum/gas_mixture/air_contents = airs["a1"] - var/datum/gas_mixture/partner_air_contents = partner.airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] + var/datum/gas_mixture/partner_air_contents = partner.airs[AIR1] var/air_heat_capacity = air_contents.heat_capacity() var/other_air_heat_capacity = partner_air_contents.heat_capacity() diff --git a/code/ATMOSPHERICS/components/unary_devices/heat_source.dm b/code/ATMOSPHERICS/components/unary_devices/heat_source.dm index ab107de56e0..ceba342a5fa 100644 --- a/code/ATMOSPHERICS/components/unary_devices/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary_devices/heat_source.dm @@ -17,7 +17,7 @@ if(showpipe) overlays += getpipeimage('icons/obj/atmospherics/components/unary_devices.dmi', "scrub_cap", initialize_directions) //scrub_cap works for now - if(!nodes["n1"] || !on || stat & (NOPOWER|BROKEN)) + if(!nodes[NODE1] || !on || stat & (NOPOWER|BROKEN)) icon_state = "cold_off" return @@ -29,7 +29,7 @@ if(!on) return 0 - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] var/air_heat_capacity = air_contents.heat_capacity() var/combined_heat_capacity = current_heat_capacity + air_heat_capacity diff --git a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm index 56c534d43ad..ca0cf4d90ac 100644 --- a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm +++ b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm @@ -25,7 +25,7 @@ on = 1 /obj/machinery/atmospherics/components/unary/outlet_injector/update_icon_nopipes() - if(!nodes["n1"] || !on || stat & (NOPOWER|BROKEN)) + if(!nodes[NODE1] || !on || stat & (NOPOWER|BROKEN)) icon_state = "inje_off" return @@ -45,7 +45,7 @@ if(!on || stat & NOPOWER) return 0 - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] if(air_contents.temperature > 0) var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION) @@ -63,7 +63,7 @@ if(on || injecting) return 0 - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] injecting = 1 @@ -130,7 +130,7 @@ if("set_volume_rate" in signal.data) var/number = text2num(signal.data["set_volume_rate"]) - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] volume_rate = Clamp(number, 0, air_contents.volume) if("status" in signal.data) diff --git a/code/ATMOSPHERICS/components/unary_devices/oxygen_generator.dm b/code/ATMOSPHERICS/components/unary_devices/oxygen_generator.dm index 6c3d654be14..d8c1d69e200 100644 --- a/code/ATMOSPHERICS/components/unary_devices/oxygen_generator.dm +++ b/code/ATMOSPHERICS/components/unary_devices/oxygen_generator.dm @@ -18,7 +18,7 @@ if(showpipe) overlays += getpipeimage('icons/obj/atmospherics/components/unary_devices.dmi', "scrub_cap", initialize_directions) //it works for now - if(!nodes["n1"] || !on || stat & BROKEN) + if(!nodes[NODE1] || !on || stat & BROKEN) icon_state = "o2gen_off" return @@ -27,15 +27,16 @@ /obj/machinery/atmospherics/components/unary/oxygen_generator/New() ..() - var/datum/gas_mixture/air_contents = airs["a1"] ; air_contents.volume = 50 - airs["a1"] = air_contents + var/datum/gas_mixture/air_contents = airs[AIR1] + air_contents.volume = 50 + airs[AIR1] = air_contents /obj/machinery/atmospherics/components/unary/oxygen_generator/process_atmos() ..() if(!on) return 0 - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] var/total_moles = air_contents.total_moles() diff --git a/code/ATMOSPHERICS/components/unary_devices/tank.dm b/code/ATMOSPHERICS/components/unary_devices/tank.dm index a9ecac258ae..8f8f6b9e831 100644 --- a/code/ATMOSPHERICS/components/unary_devices/tank.dm +++ b/code/ATMOSPHERICS/components/unary_devices/tank.dm @@ -11,7 +11,7 @@ /obj/machinery/atmospherics/components/unary/tank/carbon_dioxide/New() ..() - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] air_contents.volume = volume air_contents.temperature = T20C air_contents.carbon_dioxide = (25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature) @@ -22,7 +22,7 @@ /obj/machinery/atmospherics/components/unary/tank/toxins/New() ..() - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] air_contents.volume = volume air_contents.temperature = T20C air_contents.toxins = (25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature) @@ -33,7 +33,7 @@ /obj/machinery/atmospherics/components/unary/tank/oxygen_agent_b/New() ..() - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] air_contents.volume = volume air_contents.temperature = T0C var/datum/gas/oxygen_agent_b/trace_gas = new @@ -46,7 +46,7 @@ /obj/machinery/atmospherics/components/unary/tank/oxygen/New() ..() - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] air_contents.volume = volume air_contents.temperature = T20C air_contents.oxygen = (25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature) @@ -57,7 +57,7 @@ /obj/machinery/atmospherics/components/unary/tank/nitrogen/New() ..() - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] air_contents.volume = volume air_contents.temperature = T20C air_contents.nitrogen = (25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature) @@ -68,7 +68,7 @@ /obj/machinery/atmospherics/components/unary/tank/air/New() ..() - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] air_contents.volume = volume air_contents.temperature = T20C air_contents.oxygen = (25*ONE_ATMOSPHERE*O2STANDARD)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature) diff --git a/code/ATMOSPHERICS/components/unary_devices/unary_base.dm b/code/ATMOSPHERICS/components/unary_devices/unary_base.dm index bf8a767db29..1a552848531 100644 --- a/code/ATMOSPHERICS/components/unary_devices/unary_base.dm +++ b/code/ATMOSPHERICS/components/unary_devices/unary_base.dm @@ -31,11 +31,11 @@ Housekeeping and pipe network stuff below if(..()) return 0 initialize_directions = dir - var/obj/machinery/atmospherics/node = nodes["n1"] + var/obj/machinery/atmospherics/node = nodes[NODE1] if(node) node.disconnect(src) node = null - nullifyPipenet(parents["p1"]) + nullifyPipenet(parents[PARENT1]) atmosinit() initialize() if(node) @@ -44,4 +44,4 @@ Housekeeping and pipe network stuff below node.addMember(src) build_network() . = 1 - nodes["n1"] = node \ No newline at end of file + nodes[NODE1] = node \ No newline at end of file diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm index 4e9e04f8958..3f74b8c7de5 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm @@ -69,7 +69,7 @@ /obj/machinery/atmospherics/components/unary/vent_pump/high_volume/New() ..() - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] air_contents.volume = 1000 /obj/machinery/atmospherics/components/unary/vent_pump/update_icon_nopipes() @@ -81,7 +81,7 @@ icon_state = "vent_welded" return - if(!nodes["n1"] || !on || stat & (NOPOWER|BROKEN)) + if(!nodes[NODE1] || !on || stat & (NOPOWER|BROKEN)) icon_state = "vent_off" return @@ -94,7 +94,7 @@ ..() if(stat & (NOPOWER|BROKEN)) return - if (!nodes["n1"]) + if (!nodes[NODE1]) on = 0 //broadcast_status() // from now air alarm/control computer should request update purposely --rastaf0 if(!on) @@ -103,7 +103,7 @@ if(welded) return 0 - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] var/datum/gas_mixture/environment = loc.return_air() var/environment_pressure = environment.return_pressure() diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm index 7be2de5d991..a0888876de9 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm @@ -56,7 +56,7 @@ icon_state = "scrub_welded" return - if(!nodes["n1"] || !on || stat & (NOPOWER|BROKEN)) + if(!nodes[NODE1] || !on || stat & (NOPOWER|BROKEN)) icon_state = "scrub_off" return @@ -87,7 +87,7 @@ "panic" = panic, "filter_co2" = scrub_CO2, "filter_toxins" = scrub_Toxins, - "filter_n2o" = scrub_N2O, + "filter_NODE2o" = scrub_N2O, "sigtype" = "status" ) if(!initial_loc.air_scrub_names[id_tag]) @@ -114,13 +114,13 @@ ..() if(stat & (NOPOWER|BROKEN)) return - if (!nodes["n1"]) + if (!nodes[NODE1]) on = 0 //broadcast_status() if(!on || welded) return 0 - var/datum/gas_mixture/air_contents = airs["a1"] + var/datum/gas_mixture/air_contents = airs[AIR1] var/datum/gas_mixture/environment = loc.return_air() if(scrubbing) @@ -218,9 +218,9 @@ if("toggle_tox_scrub" in signal.data) scrub_Toxins = !scrub_Toxins - if("n2o_scrub" in signal.data) + if("NODE2o_scrub" in signal.data) scrub_N2O = text2num(signal.data["n2o_scrub"]) - if("toggle_n2o_scrub" in signal.data) + if("toggle_NODE2o_scrub" in signal.data) scrub_N2O = !scrub_N2O if("init" in signal.data)