From 473c05abd695f62b3d03e6e4d933a723433b330b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 28 Nov 2020 12:55:20 +0100 Subject: [PATCH] [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> --- code/modules/atmospherics/gasmixtures/reactions.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 2457111b23e..29881635c8c 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -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