mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
Adds Methane and Methyl Bromide
This commit is contained in:
@@ -149,6 +149,27 @@
|
||||
name = "Choking (Plasma)"
|
||||
desc = "There's highly flammable, toxic plasma in the air and you're breathing it in. Find some fresh air. The box in your backpack has an oxygen tank and gas mask in it."
|
||||
icon_state = "too_much_tox"
|
||||
|
||||
/obj/screen/alert/not_enough_ch4
|
||||
name = "Choking (No CH4)"
|
||||
desc = "You're not getting enough methane. Find some good air before you pass out!"
|
||||
icon_state = "not_enough_ch4"
|
||||
|
||||
/obj/screen/alert/too_much_ch4
|
||||
name = "Choking (CH4)"
|
||||
desc = "There's too much methane in the air, and you're breathing it in! Find some good air before you pass out!"
|
||||
icon_state = "too_much_ch4"
|
||||
|
||||
/obj/screen/alert/not_enough_ch3br
|
||||
name = "Choking (No CH3Br)"
|
||||
desc = "You're not getting enough methyl bromide. Find some good air before you pass out!"
|
||||
icon_state = "not_enough_tox"
|
||||
|
||||
/obj/screen/alert/too_much_ch3br
|
||||
name = "Choking (CH3Br)"
|
||||
desc = "There's highly toxic methyl bromide in the air and you're breathing it in. Find some fresh air. The box in your backpack has an oxygen tank and gas mask in it."
|
||||
icon_state = "too_much_tox"
|
||||
|
||||
//End gas alerts
|
||||
|
||||
|
||||
|
||||
@@ -182,3 +182,20 @@
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/double/empty/populate_gas()
|
||||
return
|
||||
|
||||
/*
|
||||
* Methyl Bromide
|
||||
*/
|
||||
/obj/item/tank/internals/methyl_bromide
|
||||
name = "mantid gas reactor"
|
||||
desc = "A mantid gas processing plant that continuously synthesises 'breathable' atmosphere."
|
||||
icon_state = "methyl_bromide"
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
force = 6
|
||||
distribute_pressure = 13
|
||||
volume = 10
|
||||
|
||||
/obj/item/tank/internals/methyl_bromide/populate_gas()
|
||||
air_contents.set_moles(/datum/gas/methyl_bromide, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
@@ -186,6 +186,20 @@ GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(/datum/gas/oxygen, /datum/g
|
||||
moles_visible = MOLES_GAS_VISIBLE * 60
|
||||
rarity = 250
|
||||
|
||||
/datum/gas/methane
|
||||
id = "methane"
|
||||
specific_heat = 30
|
||||
name = "Methane"
|
||||
rarity = 320
|
||||
|
||||
/datum/gas/methyl_bromide
|
||||
id = "methyl_bromide"
|
||||
specific_heat = 42
|
||||
name = "Methyl Bromide"
|
||||
dangerous = TRUE
|
||||
rarity = 310
|
||||
|
||||
|
||||
/obj/effect/overlay/gas
|
||||
icon = 'icons/effects/atmospherics.dmi'
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
/datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
|
||||
/datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000),
|
||||
/datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10),
|
||||
/datum/gas/miasma = new/datum/tlv/(-1, -1, 2, 5),
|
||||
/datum/gas/miasma = new/datum/tlv(-1, -1, 2, 5),
|
||||
/datum/gas/plasma = new/datum/tlv/dangerous,
|
||||
/datum/gas/nitrous_oxide = new/datum/tlv/dangerous,
|
||||
/datum/gas/bz = new/datum/tlv/dangerous,
|
||||
@@ -106,7 +106,9 @@
|
||||
/datum/gas/tritium = new/datum/tlv/dangerous,
|
||||
/datum/gas/stimulum = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects
|
||||
/datum/gas/nitryl = new/datum/tlv/dangerous,
|
||||
/datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000) // Unlike oxygen, pluoxium does not fuel plasma/tritium fires
|
||||
/datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000), // Unlike oxygen, pluoxium does not fuel plasma/tritium fires
|
||||
/datum/gas/methane = new/datum/tlv(-1, -1, 3, 6),
|
||||
/datum/gas/methyl_bromide = new/datum/tlv/dangerous
|
||||
)
|
||||
|
||||
/obj/machinery/airalarm/server // No checks here.
|
||||
@@ -125,7 +127,9 @@
|
||||
/datum/gas/tritium = new/datum/tlv/no_checks,
|
||||
/datum/gas/stimulum = new/datum/tlv/no_checks,
|
||||
/datum/gas/nitryl = new/datum/tlv/no_checks,
|
||||
/datum/gas/pluoxium = new/datum/tlv/no_checks
|
||||
/datum/gas/pluoxium = new/datum/tlv/no_checks,
|
||||
/datum/gas/methane = new/datum/tlv/no_checks,
|
||||
/datum/gas/methyl_bromide = new/datum/tlv/no_checks
|
||||
)
|
||||
|
||||
/obj/machinery/airalarm/kitchen_cold_room // Copypasta: to check temperatures.
|
||||
@@ -144,7 +148,9 @@
|
||||
/datum/gas/tritium = new/datum/tlv/dangerous,
|
||||
/datum/gas/stimulum = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects
|
||||
/datum/gas/nitryl = new/datum/tlv/dangerous,
|
||||
/datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000) // Unlike oxygen, pluoxium does not fuel plasma/tritium fires
|
||||
/datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000), // Unlike oxygen, pluoxium does not fuel plasma/tritium fires
|
||||
/datum/gas/methane = new/datum/tlv(-1, -1, 3, 6),
|
||||
/datum/gas/methyl_bromide = new/datum/tlv/dangerous
|
||||
)
|
||||
|
||||
/obj/machinery/airalarm/unlocked
|
||||
@@ -542,7 +548,9 @@
|
||||
/datum/gas/tritium,
|
||||
/datum/gas/bz,
|
||||
/datum/gas/stimulum,
|
||||
/datum/gas/pluoxium
|
||||
/datum/gas/pluoxium,
|
||||
/datum/gas/methane,
|
||||
/datum/gas/methyl_bromide
|
||||
),
|
||||
"scrubbing" = 1,
|
||||
"widenet" = 1,
|
||||
|
||||
@@ -50,7 +50,9 @@
|
||||
"stimulum" = /obj/machinery/portable_atmospherics/canister/stimulum,
|
||||
"pluoxium" = /obj/machinery/portable_atmospherics/canister/pluoxium,
|
||||
"caution" = /obj/machinery/portable_atmospherics/canister,
|
||||
"miasma" = /obj/machinery/portable_atmospherics/canister/miasma
|
||||
"miasma" = /obj/machinery/portable_atmospherics/canister/miasma,
|
||||
"methane" = /obj/machinery/portable_atmospherics/canister/methane,
|
||||
"methyl bromide" = /obj/machinery/portable_atmospherics/canister/methyl_bromide
|
||||
)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/interact(mob/user)
|
||||
@@ -62,7 +64,7 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/nitrogen
|
||||
name = "n2 canister"
|
||||
desc = "Nitrogen gas. Reportedly useful for something."
|
||||
desc = "Nitrogen. Reportedly useful for something."
|
||||
icon_state = "red"
|
||||
gas_type = /datum/gas/nitrogen
|
||||
|
||||
@@ -80,19 +82,19 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/toxins
|
||||
name = "plasma canister"
|
||||
desc = "Plasma gas. The reason YOU are here. Highly toxic."
|
||||
desc = "Plasma. The reason YOU are here. Highly toxic."
|
||||
icon_state = "orange"
|
||||
gas_type = /datum/gas/plasma
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/bz
|
||||
name = "\improper BZ canister"
|
||||
desc = "BZ, a powerful hallucinogenic nerve agent."
|
||||
desc = "BZ. A powerful hallucinogenic nerve agent."
|
||||
icon_state = "purple"
|
||||
gas_type = /datum/gas/bz
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/nitrous_oxide
|
||||
name = "n2o canister"
|
||||
desc = "Nitrous oxide gas. Known to cause drowsiness."
|
||||
desc = "Nitrous oxide. Known to cause drowsiness."
|
||||
icon_state = "redws"
|
||||
gas_type = /datum/gas/nitrous_oxide
|
||||
|
||||
@@ -115,7 +117,7 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/nitryl
|
||||
name = "nitryl canister"
|
||||
desc = "Nitryl gas. Feels great 'til the acid eats your lungs."
|
||||
desc = "Nitryl. Feels great 'til the acid eats your lungs."
|
||||
icon_state = "brown"
|
||||
gas_type = /datum/gas/nitryl
|
||||
|
||||
@@ -133,7 +135,7 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/water_vapor
|
||||
name = "water vapor canister"
|
||||
desc = "Water Vapor. We get it, you vape."
|
||||
desc = "Water vapor. We get it, you vape."
|
||||
icon_state = "water_vapor"
|
||||
gas_type = /datum/gas/water_vapor
|
||||
filled = 1
|
||||
@@ -145,6 +147,18 @@
|
||||
gas_type = /datum/gas/miasma
|
||||
filled = 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/methane
|
||||
name = "methane canister"
|
||||
desc = "Methane. The simplest of hydrocarbons. Non-toxic but highly flammable."
|
||||
icon_state = "greyblackred"
|
||||
gas_type = /datum/gas/methane
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/methyl_bromide
|
||||
name = "methyl bromide canister"
|
||||
desc = "Methyl bromide. A potent toxin to most, essential for the Kharmaan to live."
|
||||
icon_state = "purplecyan"
|
||||
gas_type = /datum/gas/methyl_bromide
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/get_time_left()
|
||||
if(timing)
|
||||
. = round(max(0, valve_timer - world.time) / 10, 1)
|
||||
|
||||
@@ -96,6 +96,8 @@
|
||||
throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
|
||||
else if(S.breathid == "n2")
|
||||
throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro)
|
||||
else if(S.breathid == "ch3br")
|
||||
throw_alert("not_enough_ch3br", /obj/screen/alert/not_enough_ch3br)
|
||||
|
||||
return FALSE
|
||||
else
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
var/safe_co2_max = 10 // Yes it's an arbitrary value who cares?
|
||||
var/safe_toxins_min = 0
|
||||
var/safe_toxins_max = MOLES_GAS_VISIBLE
|
||||
var/safe_ch3br_min = 0
|
||||
var/safe_ch3br_max = 1 //problematic even at low concentrations
|
||||
var/safe_methane_min = 0
|
||||
var/safe_methane_max = 0
|
||||
var/SA_para_min = 1 //Sleeping agent
|
||||
var/SA_sleep_min = 5 //Sleeping agent
|
||||
var/BZ_trip_balls_min = 1 //BZ gas
|
||||
@@ -53,6 +57,9 @@
|
||||
var/tox_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
|
||||
var/tox_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
|
||||
var/tox_damage_type = TOX
|
||||
var/methane_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
|
||||
var/methane_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
|
||||
var/methane_damage_type = OXY
|
||||
|
||||
var/cold_message = "your face freezing and an icicle forming"
|
||||
var/cold_level_1_threshold = 260
|
||||
@@ -129,6 +136,8 @@
|
||||
H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
|
||||
else if(safe_nitro_min)
|
||||
H.throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro)
|
||||
else if(safe_ch3br_min)
|
||||
H.throw_alert("not_enough_ch3br", /obj/screen/alert/not_enough_ch3br)
|
||||
return FALSE
|
||||
|
||||
var/gas_breathed = 0
|
||||
@@ -138,6 +147,8 @@
|
||||
var/N2_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/nitrogen))
|
||||
var/Toxins_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/plasma))
|
||||
var/CO2_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/carbon_dioxide))
|
||||
var/CH4_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/methane))
|
||||
var/CH3Br_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/methyl_bromide))
|
||||
|
||||
|
||||
//-- OXY --//
|
||||
@@ -278,6 +289,58 @@
|
||||
breath.adjust_moles(/datum/gas/carbon_dioxide, gas_breathed)
|
||||
gas_breathed = 0
|
||||
|
||||
//-- METHANE --//
|
||||
|
||||
//Too much methane!
|
||||
if(safe_methane_max)
|
||||
if(CH4_pp > safe_methane_max) //Same effect as excess nitrogen, generally nontoxic
|
||||
var/ratio = (breath.get_moles(/datum/gas/methane)/safe_methane_max) * 10
|
||||
H.apply_damage_type(clamp(ratio, methane_breath_dam_min, methane_breath_dam_max), methane_damage_type)
|
||||
H.throw_alert("too_much_ch4", /obj/screen/alert/too_much_ch4)
|
||||
H.losebreath += 2
|
||||
else
|
||||
H.clear_alert("too_much_ch4")
|
||||
//Too little methane!
|
||||
if(safe_methane_min)
|
||||
if(CH4_pp < safe_methane_min)
|
||||
gas_breathed = handle_too_little_breath(H, CH4_pp, safe_methane_min, breath.get_moles(/datum/gas/methane))
|
||||
H.throw_alert("not_enough_ch4", /obj/screen/alert/not_enough_ch4)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
if(H.health >= H.crit_threshold)
|
||||
H.adjustOxyLoss(-breathModifier)
|
||||
gas_breathed = breath.get_moles(/datum/gas/methane)
|
||||
H.clear_alert("not_enough_ch4")
|
||||
|
||||
//Exhale
|
||||
breath.adjust_moles(/datum/gas/methane, -gas_breathed)
|
||||
breath.adjust_moles(/datum/gas/methyl_bromide, gas_breathed)
|
||||
gas_breathed = 0
|
||||
|
||||
//-- CH3BR --//
|
||||
|
||||
//Too much methyl bromide!
|
||||
if(safe_ch3br_max)
|
||||
if(CH3Br_pp > safe_ch3br_max)
|
||||
if(prob(CH3Br_pp/0.5))
|
||||
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, 3, 150) //Inhaling this is a bad idea
|
||||
if(prob(CH3Br_pp/2))
|
||||
to_chat(H, "<span class='alert'>Your throat closes up!</span>")
|
||||
H.silent = max(H.silent, 3)
|
||||
H.throw_alert("too_much_ch3br", /obj/screen/alert/too_much_ch3br)
|
||||
else
|
||||
H.clear_alert("too_much_ch3br")
|
||||
//Too little methyl bromide!
|
||||
if(safe_ch3br_min)
|
||||
if(CH3Br_pp < safe_ch3br_min)
|
||||
gas_breathed = handle_too_little_breath(H, CH3Br_pp, safe_ch3br_min, breath.get_moles(/datum/gas/methyl_bromide))
|
||||
H.throw_alert("not_enough_ch3br", /obj/screen/alert/not_enough_ch3br)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
if(H.health >= H.crit_threshold)
|
||||
H.adjustOxyLoss(-breathModifier)
|
||||
gas_breathed = breath.get_moles(/datum/gas/methyl_bromide)
|
||||
H.clear_alert("not_enough_ch3br")
|
||||
|
||||
//-- TRACES --//
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -808,8 +808,6 @@
|
||||
#include "code\game\machinery\mass_driver.dm"
|
||||
#include "code\game\machinery\navbeacon.dm"
|
||||
#include "code\game\machinery\PDApainter.dm"
|
||||
#include "code\game\machinery\poweredfans\fan_assembly.dm"
|
||||
#include "code\game\machinery\poweredfans\poweredfans.dm"
|
||||
#include "code\game\machinery\quantum_pad.dm"
|
||||
#include "code\game\machinery\recharger.dm"
|
||||
#include "code\game\machinery\rechargestation.dm"
|
||||
@@ -887,6 +885,8 @@
|
||||
#include "code\game\machinery\porta_turret\portable_turret.dm"
|
||||
#include "code\game\machinery\porta_turret\portable_turret_construct.dm"
|
||||
#include "code\game\machinery\porta_turret\portable_turret_cover.dm"
|
||||
#include "code\game\machinery\poweredfans\fan_assembly.dm"
|
||||
#include "code\game\machinery\poweredfans\poweredfans.dm"
|
||||
#include "code\game\machinery\shuttle\custom_shuttle.dm"
|
||||
#include "code\game\machinery\shuttle\shuttle_engine.dm"
|
||||
#include "code\game\machinery\shuttle\shuttle_heater.dm"
|
||||
|
||||
Reference in New Issue
Block a user