From 22b8bf18c692ee1f916874bec0d93a0e0fe8aaf4 Mon Sep 17 00:00:00 2001 From: Atermonera Date: Wed, 11 Mar 2020 12:51:48 -0700 Subject: [PATCH] Merge pull request #6786 from Mechoid/StabilizerStabilizes Stabilizer stabilizes stably --- code/game/machinery/oxygen_pump.dm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/oxygen_pump.dm b/code/game/machinery/oxygen_pump.dm index 9378cc2f929..7f2b310ed60 100644 --- a/code/game/machinery/oxygen_pump.dm +++ b/code/game/machinery/oxygen_pump.dm @@ -294,9 +294,22 @@ breather.internals.icon_state = "internal0" if(breather) // Safety. - if(ishuman(breather)) + if(ishuman(breather) && !(breather.isSynthetic())) var/mob/living/carbon/human/H = breather + if(H.internal_organs_by_name[O_LUNGS]) + var/obj/item/organ/internal/L = H.internal_organs_by_name[O_LUNGS] + if(L) + if(!(L.status & ORGAN_DEAD)) + H.adjustOxyLoss(-(rand(10,15))) + + if(L.is_bruised() && prob(30)) + L.take_damage(-1) + else + H.AdjustLosebreath(-(rand(1, 5))) + else + H.adjustOxyLoss(-(rand(1,8))) + if(H.stat == DEAD) H.add_modifier(/datum/modifier/bloodpump_corpse, 6 SECONDS)