mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-05 15:03:48 +00:00
Moved gas_filter_strength out of clothing and into gas masks.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
/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)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
gas_transfer_coefficient = 0.01
|
||||
permeability_coefficient = 0.01
|
||||
siemens_coefficient = 0.9
|
||||
gas_filter_strength = 1
|
||||
var/gas_filter_strength = 1 //For gas mask filters
|
||||
|
||||
//Plague Dr suit can be found in clothing/suits/bio.dm
|
||||
/obj/item/clothing/mask/gas/plaguedoctor
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user