From c6a29019b2fa86b4139d8a7604d80aaae2420a06 Mon Sep 17 00:00:00 2001 From: Mloc Date: Mon, 30 Apr 2012 21:18:07 +0100 Subject: [PATCH 1/2] 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) From a33be4b8caaf425d2932291db114aa272de4f298 Mon Sep 17 00:00:00 2001 From: Mloc Date: Mon, 30 Apr 2012 21:29:10 +0100 Subject: [PATCH 2/2] Changed age limits to 20-65, added an icon that I forgot to commit. Signed-off-by: Mloc --- code/modules/mob/new_player/preferences.dm | 2 +- code/modules/mob/new_player/preferences_setup.dm | 2 +- icons/obj/atmospherics/n2o_pipe_tank.dmi | Bin 0 -> 1553 bytes 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 icons/obj/atmospherics/n2o_pipe_tank.dmi diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index 8e23153041e..194f4af8c92 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -636,7 +636,7 @@ datum/preferences if("input") var/new_age = input(user, "Please select type in age: 15-45", "Character Generation") as num if(new_age) - age = max(min(round(text2num(new_age)), 45), 15) + age = max(min(round(text2num(new_age)), 65), 20) if("random") age = rand (20, 45) diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index b75fef33f1d..79a76a6d2f1 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -15,7 +15,7 @@ datum/preferences underwear = 1 backbag = 2 b_type = pick("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-") - age = rand(19,35) + age = rand(20,65) copy_to(H,1) proc/randomize_name() diff --git a/icons/obj/atmospherics/n2o_pipe_tank.dmi b/icons/obj/atmospherics/n2o_pipe_tank.dmi new file mode 100644 index 0000000000000000000000000000000000000000..71a8381a68972e95580fe11a1598ecf578c62e6e GIT binary patch literal 1553 zcmV+s2JZQZP)aDHZZEe#>NAdUf--LwP zX=%txO5&B3-;0a8A0Ns&Io3~4%|%7aIXTi?T+2pA%r-XOhlkBOJIpvZ%q}j|NJ!B{ zL`4V);Ej!)6BGW~*~Kj_yCEU{zP`soLfn9W@t&UXv9a>6uf;Mlz$GQiFE7kJJ8PmMXlT`1TDmqinHCm^h=_}ei^?i0&_O}FySur$xwyEvy1KeoS65tI zTw!5h9UUDW9v+?;7_%!Y(?&+fI5@>TJjysYzc)AGl$1#c3CSxf$UZ*8E-u}MhRiK3 z%QrXUm6hI&jg1iz+Jb`dnws&mv-7pJ!#O#bCnqfh1W98yjmG89fRLBm@MGj*j?DEUEwi00DGTPE!Ct=GbNc004S=R9JLG zWpiV4X>fFDZ*Bkpc$`yKaB_9`^iy#0_2eo`Eh^5;&r`5fFwryM;w;ZhDainGjE%TB zGg33tGfE(w;*!LYR3K9+Gp{5uxkQPJGbOXA7^I7fGp#5wHx=)uJ+^(`qXVJG9bL%cP6$Q(3b+`#&3&MPPRmh8e3@`@Qu&_x(O*hv9p} z_ZtAniXxk>2>d$iIryZnX8>>@jxrqT4R!7;cDURnHd~3?Bw`>g%z57D@Ln=Rj&z)Xx)4^7lj6-cL{=->sQRPx242uvRIm%&klyU6%iSz>+PWts9 zVv>vD_VB6GdGRyJNKZjNd+vP4g^Q8S$fe8GSFRei0$kqJ)s3$1%r!(+fZpM?>+Nin z-!MaLexs)sT{qJSvV_)<6%$J&K`Cq)0GHqD>ql2#<_u7RN}+_pWQKTrK#kiIOK7Zu z>?J1Sg;WV1*Qy}W(HV)TRdC0&N($#_FBz;5;oYHDv5k+yd-oqaq{|bV)uRd+gQ6IX zLHPKIP)3)lyWvwlHY7qm#y@)=c%lD7A>@YLP}UDX$Wg*e`PJ(;p||R8_-)HxXk zU?don<9s|i6p!=ruslMW17<`Cj&eN0-01tUF=OLI$Wb9XKQJFZeg5+G8}r?1)|ruU zl;BZ-T^S!&08l(;19%doV2%NPI;oW&`GMsJmLKHn2f6xx0)NP_|F@%m3iJo!{{Q#* zf%W@=