Nitroglycerin Explosion Fix (#8028)

This commit is contained in:
MarinaGryphon
2020-01-17 07:57:18 +01:00
committed by Matt Atlas
parent 7aa0e6475b
commit 34de84e5ec
2 changed files with 45 additions and 0 deletions
@@ -413,6 +413,7 @@
reagent_state = LIQUID
color = "#808080"
taste_description = "oil"
var/temp_set = FALSE
/datum/reagent/nitroglycerin/proc/explode()
var/datum/effect/effect/system/reagents_explosion/e = new()
@@ -427,6 +428,9 @@
/datum/reagent/nitroglycerin/add_thermal_energy(var/added_energy)
. = ..()
if(!temp_set) // so initial temperature-setting doesn't make stuff explode
temp_set = TRUE
return
if(abs(added_energy) > (specific_heat * 5 / volume)) // can explode via cold or heat shock
explode()