Fixes stimulum running out before the next breath (#34296)

This commit is contained in:
kevinz000
2018-01-12 11:04:12 -08:00
committed by CitadelStationBot
parent 5bb87e6778
commit 54b356a227
2 changed files with 4 additions and 2 deletions
+2 -1
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()