Merge pull request #4794 from Citadel-Station-13/upstream-merge-34296

[MIRROR] Fixes stimulum running out before the next breath
This commit is contained in:
deathride58
2018-01-13 20:21:21 +00:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -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

View File

@@ -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()