Adjusts chemsmoke breathing

Inhaled reagents are now split between bloodstream and ingestion.
Reagents are not inhaled if environment pressure is too low.
This commit is contained in:
mwerezak
2015-10-15 06:45:22 -04:00
parent d260b3bb18
commit 41e8798516
3 changed files with 6 additions and 3 deletions
+4 -2
View File
@@ -60,13 +60,15 @@
//Handle possble chem smoke effect
/mob/living/carbon/proc/handle_chemical_smoke(var/datum/gas_mixture/environment)
if(species && environment.return_pressure() < species.breath_pressure/5)
return //pressure is too low to even breathe in.
if(wear_mask && (wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT))
return
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.trans_to_mob(src, 10, CHEM_INGEST, copy = 1)
//maybe check air pressure here or something to see if breathing in smoke is even possible.
smoke.reagents.trans_to_mob(src, 5, CHEM_INGEST, copy = 1)
smoke.reagents.trans_to_mob(src, 5, CHEM_BLOOD, copy = 1)
// I dunno, maybe the reagents enter the blood stream through the lungs?
break // If they breathe in the nasty stuff once, no need to continue checking
+1 -1
View File
@@ -391,7 +391,7 @@
return 0
var/safe_pressure_min = 16 // Minimum safe partial pressure of breathable gas in kPa
var/safe_pressure_min = species.breath_pressure // Minimum safe partial pressure of breathable gas in kPa
// Lung damage increases the minimum safe pressure.
if(species.has_organ["lungs"])
@@ -60,6 +60,7 @@
// Environment tolerance/life processes vars.
var/reagent_tag //Used for metabolizing reagents.
var/breath_pressure = 16 // Minimum partial pressure safe for breathing, kPa
var/breath_type = "oxygen" // Non-oxygen gas breathed, if any.
var/poison_type = "phoron" // Poisonous air.
var/exhale_type = "carbon_dioxide" // Exhaled gas type.