[MIRROR] Proto Nitrate reaction fix (#1896)

* Proto Nitrate reaction fix (#55188)

Fix runtime with proto_nitrate reaction with trit

* Proto Nitrate reaction fix

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-11-28 12:55:20 +01:00
committed by GitHub
co-authored by Ghilker
parent 1ef3f4bbe0
commit 473c05abd6
@@ -936,6 +936,8 @@ nobiliumsuppression = INFINITY
var/list/cached_gases = air.gases
var/temperature = air.temperature
var/turf/open/location = isturf(holder) ? holder : null
if(location == null)
return NO_REACTION
var produced_amount = min(5, cached_gases[/datum/gas/tritium][MOLES], cached_gases[/datum/gas/proto_nitrate][MOLES])
if(cached_gases[/datum/gas/tritium][MOLES] - produced_amount < 0 || cached_gases[/datum/gas/proto_nitrate][MOLES] - produced_amount * 0.01 < 0)
return NO_REACTION