Moved gas_filter_strength out of clothing and into gas masks.

This commit is contained in:
Erthilo
2013-09-02 17:38:42 +01:00
parent 37acbe9bf7
commit afcfed02bd
4 changed files with 15 additions and 9 deletions
+7 -3
View File
@@ -334,10 +334,14 @@
if(head.flags & BLOCK_GAS_SMOKE_EFFECT)
block = 1
if(!block && !wear_mask)
breath = loc.remove_air(breath_moles, 0)
if(block && wear_mask)
if(istype(wear_mask, /obj/item/clothing/mask/gas))
var/obj/item/clothing/mask/gas/G = wear_mask
breath = loc.remove_air(breath_moles, G.gas_filter_strength) //Filters out harmful gases
else
breath = loc.remove_air(breath_moles, 0)
else
breath = loc.remove_air(breath_moles, wear_mask.gas_filter_strength) //Filters out harmful gases
breath = loc.remove_air(breath_moles, 0)
if(!is_lung_ruptured())
if(!breath || breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5)
@@ -232,13 +232,16 @@
if(istype(wear_mask, /obj/item/clothing/mask/gas))
block = 1
if(!block)
breath = loc.remove_air(breath_moles, 0)
if(block && wear_mask)
if(istype(wear_mask, /obj/item/clothing/mask/gas))
var/obj/item/clothing/mask/gas/G = wear_mask
breath = loc.remove_air(breath_moles, G.gas_filter_strength) //Filters out harmful gases
else
breath = loc.remove_air(breath_moles, 0)
else
breath = loc.remove_air(breath_moles, wear_mask.gas_filter_strength) //Filters out harmful gases
breath = loc.remove_air(breath_moles, 0)
if(!block)
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)