From 54b356a22717d464db824c2d07ae79913a3d4c6e Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 12 Jan 2018 11:04:12 -0800 Subject: [PATCH 1/2] Fixes stimulum running out before the next breath (#34296) --- code/modules/reagents/chemistry/reagents/other_reagents.dm | 3 ++- code/modules/surgery/organs/lungs.dm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 8f0fb11e32..dd740b0c68 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1173,7 +1173,8 @@ M.AdjustKnockdown(-20, 0) M.AdjustUnconscious(-20, 0) M.adjustStaminaLoss(-0.5*REM, 0) - ..() + current_cycle++ + holder.remove_reagent(id, 0.99) //Gives time for the next tick of life(). . = TRUE //Update status effects. /datum/reagent/nitryl diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index 102ac9720f..0afa4f225b 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -283,7 +283,8 @@ // Stimulum gas_breathed = breath_gases[/datum/gas/stimulum][MOLES] if (gas_breathed > gas_stimulation_min) - H.reagents.add_reagent("stimulum",1) + var/existing = H.reagents.get_reagent_amount("stimulum") + H.reagents.add_reagent("stimulum",max(0, 1 - existing)) breath_gases[/datum/gas/stimulum][MOLES]-=gas_breathed handle_breath_temperature(breath, H) breath.garbage_collect()