From c6a29019b2fa86b4139d8a7604d80aaae2420a06 Mon Sep 17 00:00:00 2001 From: Mloc Date: Mon, 30 Apr 2012 21:18:07 +0100 Subject: [PATCH] Added highcap tanks and pumps for Hawk. Signed-off-by: Mloc --- .../components/binary_devices/pump.dm | 11 +- code/ATMOSPHERICS/pipes.dm | 117 ++++++++++++++++++ 2 files changed, 126 insertions(+), 2 deletions(-) diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 9044fdb8ffb..a008536187d 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -21,11 +21,18 @@ obj/machinery/atmospherics/binary/pump var/on = 0 var/target_pressure = ONE_ATMOSPHERE + var/max_pressure = 4500 var/frequency = 0 var/id = null var/datum/radio_frequency/radio_connection + highcap + name = "High capacity gas pump" + desc = "A high capacity pump" + + max_pressure = 15000000 + /* attack_hand(mob/user) on = !on @@ -160,8 +167,8 @@ obj/machinery/atmospherics/binary/pump if(href_list["power"]) on = !on if(href_list["set_press"]) - var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num - src.target_pressure = max(0, min(4500, new_pressure)) + var/new_pressure = input(usr,"Enter new output pressure (0-[max_pressure]kPa)","Pressure control",src.target_pressure) as num + src.target_pressure = max(0, min(max_pressure, new_pressure)) usr.machine = src src.update_icon() src.updateUsrDialog() diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index b186603a44c..78bd890fe12 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -437,6 +437,123 @@ obj/machinery/atmospherics/pipe ..() + n2o + icon = 'n2o_pipe_tank.dmi' + name = "Pressure Tank (N2O)" + + New() + air_temporary = new + air_temporary.volume = volume + air_temporary.temperature = T0C + + var/datum/gas/sleeping_agent/trace_gas = new + trace_gas.moles = (25*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature) + + air_temporary.trace_gases += trace_gas + + ..() + + + highcap + carbon_dioxide + name = "High Capacity Pressure Tank (Carbon Dioxide)" + + New() + air_temporary = new + air_temporary.volume = volume + air_temporary.temperature = T20C + + air_temporary.carbon_dioxide = (160*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature) + + ..() + + toxins + icon = 'orange_pipe_tank.dmi' + name = "High Capacity Pressure Tank (Plasma)" + + New() + air_temporary = new + air_temporary.volume = volume + air_temporary.temperature = T20C + + air_temporary.toxins = (160*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature) + + ..() + + oxygen_agent_b + icon = 'red_orange_pipe_tank.dmi' + name = "High Capacity Pressure Tank (Oxygen + Plasma)" + + New() + air_temporary = new + air_temporary.volume = volume + air_temporary.temperature = T0C + + var/datum/gas/oxygen_agent_b/trace_gas = new + trace_gas.moles = (160*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature) + + air_temporary.trace_gases += trace_gas + + ..() + + oxygen + icon = 'blue_pipe_tank.dmi' + name = "High Capacity Pressure Tank (Oxygen)" + + New() + air_temporary = new + air_temporary.volume = volume + air_temporary.temperature = T20C + + air_temporary.oxygen = (160*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature) + + ..() + + nitrogen + icon = 'red_pipe_tank.dmi' + name = "High Capacity Pressure Tank (Nitrogen)" + + New() + air_temporary = new + air_temporary.volume = volume + air_temporary.temperature = T20C + + air_temporary.nitrogen = (160*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature) + + ..() + + air + icon = 'red_pipe_tank.dmi' + name = "High Capacity Pressure Tank (Air)" + + New() + air_temporary = new + air_temporary.volume = volume + air_temporary.temperature = T20C + + air_temporary.oxygen = (160*ONE_ATMOSPHERE*O2STANDARD)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature) + air_temporary.nitrogen = (160*ONE_ATMOSPHERE*N2STANDARD)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature) + + ..() + + n2o + icon = 'n2o_pipe_tank.dmi' + name = "High Capacity Pressure Tank (N2O)" + + New() + air_temporary = new + air_temporary.volume = volume + air_temporary.temperature = T0C + + var/datum/gas/sleeping_agent/trace_gas = new + trace_gas.moles = (160*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature) + + air_temporary.trace_gases += trace_gas + + ..() + + + Del() if(node1) node1.disconnect(src)