From 875391325518665132ab486ab21c71fe19728967 Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Sat, 1 Jan 2022 19:16:58 +0100 Subject: [PATCH] robots still get bz metabolites when in bz I very nearly buffed synth lings to ignore bz. Oops, I guess something something bz properties make it still interact with them (doesn't make the most sense, but better than synthlings ignoring bz) --- code/modules/mob/living/carbon/human/life.dm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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