diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b69d327807..4cfc230075 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -76,8 +76,20 @@ /mob/living/carbon/human/check_breath(datum/gas_mixture/breath) - var/L = getorganslot(ORGAN_SLOT_LUNGS) + if(breath && HAS_TRAIT(src, TRAIT_NOBREATH) && HAS_TRAIT(src, TRAIT_AUXILIARY_LUNGS)) //Something something bz and synth cooling systems interacting (in reality, this only exists to not make robot lings too strong) + var/total_moles = breath.total_moles() + var/pressure = breath.return_pressure() + #define PP_MOLES(X) ((X / total_moles) * pressure) + #define PP(air, gas) PP_MOLES(air.get_moles(gas)) + var/bz_pp = PP(breath, GAS_BZ) + if(bz_pp > 1) + reagents.add_reagent(/datum/reagent/bz_metabolites,5) + else if(bz_pp > 0.1) + reagents.add_reagent(/datum/reagent/bz_metabolites,1) + #undef PP_MOLES + #undef PP + var/L = getorganslot(ORGAN_SLOT_LUNGS) if(!L) if(HAS_TRAIT(src, TRAIT_NOBREATH)) return