Gas mask filters Plasma and N2O.

This commit is contained in:
Erthilo
2013-09-01 20:51:19 +01:00
parent 469cc55020
commit a4829a271e
7 changed files with 33 additions and 22 deletions
+1
View File
@@ -1,6 +1,7 @@
/obj/item/clothing
name = "clothing"
var/list/species_restricted = null //Only these species can wear this kit.
var/gas_filter_strength = 0 //For gas mask filters
//BS12: Species-restricted clothing check.
/obj/item/clothing/mob_can_equip(M as mob, slot)
+2 -1
View File
@@ -1,6 +1,6 @@
/obj/item/clothing/mask/gas
name = "gas mask"
desc = "A face-covering mask that can be connected to an air supply."
desc = "A face-covering mask that can be connected to an air supply. Filters harmful gases from the air."
icon_state = "gas_alt"
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
@@ -9,6 +9,7 @@
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
siemens_coefficient = 0.9
gas_filter_strength = 1
//Plague Dr suit can be found in clothing/suits/bio.dm
/obj/item/clothing/mask/gas/plaguedoctor
+12 -9
View File
@@ -97,7 +97,7 @@
handle_pain()
handle_medical_side_effects()
// handle_medical_side_effects()
handle_stasis_bag()
@@ -322,14 +322,7 @@
// Not enough air around, take a percentage of what's there to model this properly
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath = loc.remove_air(breath_moles)
if(!is_lung_ruptured())
if(!breath || breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5)
if(prob(5))
rupture_lung()
// Handle chem smoke effect -- Doohl
// Handle filtering
var/block = 0
if(wear_mask)
if(wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT)
@@ -341,6 +334,16 @@
if(head.flags & BLOCK_GAS_SMOKE_EFFECT)
block = 1
if(!block && !wear_mask)
breath = loc.remove_air(breath_moles, 0)
else
breath = loc.remove_air(breath_moles, wear_mask.gas_filter_strength) //Filters out harmful gases
if(!is_lung_ruptured())
if(!breath || breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5)
if(prob(5))
rupture_lung()
if(!block)
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
@@ -225,7 +225,6 @@
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
else if(istype(loc, /turf/))
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath = loc.remove_air(breath_moles)
// Handle chem smoke effect -- Doohl
var/block = 0
@@ -233,6 +232,11 @@
if(istype(wear_mask, /obj/item/clothing/mask/gas))
block = 1
if(!block)
breath = loc.remove_air(breath_moles, 0)
else
breath = loc.remove_air(breath_moles, wear_mask.gas_filter_strength) //Filters out harmful gases
if(!block)
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
+1
View File
@@ -262,6 +262,7 @@
blinded = 0
eye_blind = 0
eye_blurry = 0
eye_stat = 0
ear_deaf = 0
ear_damage = 0
heal_overall_damage(1000, 1000)