GOOFMOS: FREON REWORK and WATER VAPOR

This commit is contained in:
AndrewJacksonThe2nd
2016-08-30 23:25:32 -07:00
parent 7b2a1b6aa7
commit f405ed6603
13 changed files with 85 additions and 17 deletions
@@ -181,13 +181,16 @@ var/list/gaslist_cache = null
//world << "post [temperature], [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]]
*/
if(holder)
if(cached_gases["freon"] && cached_gases["o2"])
if(cached_gases["freon"][MOLES] >= 3)
if(return_temperature() < 50)
holder.freon_gas_act()
cached_gases["freon"][MOLES] -= 3
cached_gases["o2"][MOLES] += 3
temperature += 1
if(cached_gases["freon"])
if(cached_gases["freon"][MOLES] >= MOLES_PLASMA_VISIBLE)
if(holder.freon_gas_act())
cached_gases["freon"][MOLES] -= MOLES_PLASMA_VISIBLE
if(cached_gases["water_vapor"])
if(cached_gases["water_vapor"][MOLES] >= MOLES_PLASMA_VISIBLE)
if(holder.water_vapor_gas_act())
cached_gases["water_vapor"][MOLES] -= MOLES_PLASMA_VISIBLE
fuel_burnt = 0
if(temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
//world << "pre [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]"
@@ -51,12 +51,19 @@ var/list/hardcoded_gases = list("o2","n2","co2","plasma") //the main four gases,
gas_overlay = "plasma"
moles_visible = MOLES_PLASMA_VISIBLE
/datum/gas/water_vapor
id = "water_vapor"
specific_heat = 40
name = "Water Vapor"
gas_overlay = "water_vapor"
moles_visible = MOLES_PLASMA_VISIBLE
/datum/gas/freon
id = "freon"
specific_heat = 1000
specific_heat = 2000
name = "Freon"
gas_overlay = "freon"
moles_visible = 3
moles_visible = MOLES_PLASMA_VISIBLE
/datum/gas/nitrous_oxide
id = "n2o"
@@ -78,6 +78,7 @@
"n2o" = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
"bz" = new/datum/tlv(-1, -1, 0.2, 0.5),
"freon" = new/datum/tlv(-1, -1, 0.2, 0.5),
"water_vapor" = new/datum/tlv(-1, -1, 0.2, 0.5),
)
/obj/machinery/airalarm/server // No checks here.
@@ -91,6 +92,7 @@
"n2o" = new/datum/tlv(-1, -1, -1, -1),
"bz" = new/datum/tlv(-1, -1, -1, -1),
"freon" = new/datum/tlv(-1, -1, -1, -1),
"water_vapor" = new/datum/tlv(-1, -1, -1, -1)
)
/obj/machinery/airalarm/kitchen_cold_room // Copypasta: to check temperatures.
@@ -104,6 +106,7 @@
"n2o" = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
"bz" = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
"freon" = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
"water_vapor" = new/datum/tlv(-1, -1, 0.2, 0.5)
)
//all air alarms in area are connected via magic
@@ -237,7 +240,8 @@
"filter_toxins" = info["filter_toxins"],
"filter_n2o" = info["filter_n2o"],
"filter_bz" = info["filter_bz"],
"filter_freon" = info["filter_freon"]
"filter_freon" = info["filter_freon"],
"filter_water_vapor" = info["filter_water_vapor"]
))
data["mode"] = mode
data["modes"] = list()
@@ -293,7 +297,7 @@
if(usr.has_unlimited_silicon_privilege && !wires.is_cut(WIRE_IDSCAN))
locked = !locked
. = TRUE
if("power", "co2_scrub", "tox_scrub", "n2o_scrub", "bz_scrub", "freon_scrub", "widenet", "scrubbing")
if("power", "co2_scrub", "tox_scrub", "n2o_scrub", "bz_scrub", "freon_scrub","water_vapor_scrub", "widenet", "scrubbing")
send_signal(device_id, list("[action]" = text2num(params["val"])))
. = TRUE
if("excheck")
@@ -412,6 +416,7 @@
"n2o_scrub" = 0,
"bz_scrub" = 1,
"freon_scrub"= 1,
"water_vapor_scrub"= 1,
"scrubbing" = 1,
"widenet" = 0,
))
@@ -430,6 +435,7 @@
"n2o_scrub" = 1,
"bz_scrub" = 1,
"freon_scrub"= 1,
"water_vapor_scrub"= 1,
"scrubbing" = 1,
"widenet" = 1,
))
@@ -461,6 +467,7 @@
"n2o_scrub" = 0,
"bz_scrub" = 0,
"freon_scrub"= 1,
"water_vapor_scrub"= 1,
"scrubbing" = 1,
"widenet" = 0,
))
@@ -21,6 +21,8 @@
var/scrub_N2O = 0
var/scrub_BZ = 0
var/scrub_Freon = 1
var/scrub_WaterVapor = 1
var/volume_rate = 200
var/widenet = 0 //is this scrubber acting on the 3x3 area around it.
@@ -72,6 +74,8 @@
amount += idle_power_usage
if(scrub_Freon)
amount += idle_power_usage
if(scrub_WaterVapor)
amount += idle_power_usage
else //scrubbing == SIPHONING
amount = active_power_usage
@@ -123,6 +127,7 @@
"filter_n2o" = scrub_N2O,
"filter_bz" = scrub_BZ,
"filter_Freon" = scrub_Freon,
"filter_WaterVapor" = scrub_WaterVapor,
"sigtype" = "status"
)
@@ -218,6 +223,11 @@
filtered_out.gases["freon"][MOLES] = removed_gases["freon"][MOLES]
removed.gases["freon"][MOLES] = 0
if(scrub_Freon && removed_gases["water_vapor"])
filtered_out.assert_gas("water_vapor")
filtered_out.gases["water_vapor"][MOLES] = removed_gases["water_vapor"][MOLES]
removed.gases["water_vapor"][MOLES] = 0
removed.garbage_collect()
//Remix the resulting gases
@@ -303,6 +313,11 @@
if("toggle_freon_scrub" in signal.data)
scrub_Freon = !scrub_Freon
if("water_vapor_scrub" in signal.data)
scrub_WaterVapor = text2num(signal.data["water_vapor_scrub"])
if("toggle_water_vapor_scrub" in signal.data)
scrub_WaterVapor = !scrub_WaterVapor
if("init" in signal.data)
name = signal.data["init"]
return
@@ -85,7 +85,14 @@
desc = "Freon. Great for the atmosphere!"
icon_state = "freon"
gas_type = "freon"
starter_temp = 2.7
starter_temp = 120
/obj/machinery/portable_atmospherics/canister/water_vapor
name = "water vapor canister"
desc = "Water Vapor. We get it, you vape."
icon_state = "water_vapor"
gas_type = "water_vapor"
filled = 1
/obj/machinery/portable_atmospherics/canister/New(loc, datum/gas_mixture/existing_mixture)
..()
@@ -7,7 +7,7 @@
var/volume_rate = 1000
volume = 1000
var/list/scrubbing = list("plasma", "co2", "n2o", "agent_b", "bz", "freon")
var/list/scrubbing = list("plasma", "co2", "n2o", "agent_b", "bz", "freon", "water_vapor")
/obj/machinery/portable_atmospherics/scrubber/Destroy()
var/turf/T = get_turf(src)
@@ -1416,7 +1416,6 @@
if(-INFINITY to 120)
H.throw_alert("temp", /obj/screen/alert/cold, 3)
H.apply_damage(COLD_DAMAGE_LEVEL_3*coldmod, BURN)
H.apply_status_effect(/datum/status_effect/freon)
else
H.clear_alert("temp")
+2 -2
View File
@@ -666,8 +666,8 @@
if (AM.density && AM.anchored)
pressure_resistance_prob_delta -= 20
break
..(pressure_difference, direction, pressure_resistance_prob_delta)
if(!slipping)
..(pressure_difference, direction, pressure_resistance_prob_delta)
/mob/living/verb/resist()
set name = "Resist"
@@ -71,3 +71,5 @@
var/blood_volume = 0 //how much blood the mob has
var/obj/effect/proc_holder/ranged_ability //Any ranged ability the mob has, as a click override
var/slipping = FALSE