diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index cf45ac8eb75..2f7ad3d6b7a 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -135,7 +135,7 @@ newreagent.set_thermal_energy(new_thermal_energy, src, safety = TRUE) else newreagent.set_temperature(temperature, src, safety = TRUE) - if(!new_thermal_energy && round(temperature, 1) != round(get_temperature(), 1)) + if(!new_thermal_energy && abs(temperature - get_temperature()) > 0.1) crash_with("Temperature [temperature] did not match [get_temperature()] after adding NEW reagent [rtype]!") else // Existing reagent var/old_energy = (newreagent.get_thermal_energy(src)/reagent_volumes[rtype]) * amount diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 7453f6737d6..b1479bd74ac 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -1280,6 +1280,7 @@ goodmessage = list("You feel good.","You feel relaxed.","You feel alert and focused.") value = 2 alchohol_affected = FALSE + fallback_specific_heat = 1.67 // Approximate specific heat of liquid nicotine (J/g·K) /singleton/reagent/mental/nicotine/overdose(var/mob/living/carbon/M, var/alien, var/removed, var/scale, var/datum/reagents/holder) ..() diff --git a/code/modules/reagents/Chemistry-Temperature.dm b/code/modules/reagents/Chemistry-Temperature.dm index bf1b4090d9f..b68914d69eb 100644 --- a/code/modules/reagents/Chemistry-Temperature.dm +++ b/code/modules/reagents/Chemistry-Temperature.dm @@ -13,7 +13,7 @@ /singleton/reagent/proc/set_thermal_energy(amount, var/datum/reagents/holder, safety = FALSE) var/delta = amount / get_thermal_fraction(holder) - holder.thermal_energy - if(!round(delta, 1)) + if(!delta) return holder.add_thermal_energy(delta, safety) // this handles on_heat_change for us diff --git a/html/changelogs/hellfirejag-nicotine-runtime.yml b/html/changelogs/hellfirejag-nicotine-runtime.yml new file mode 100644 index 00000000000..09579a6061b --- /dev/null +++ b/html/changelogs/hellfirejag-nicotine-runtime.yml @@ -0,0 +1,4 @@ +author: Hellfirejag +delete-after: True +changes: + - bugfix: "Fixed a spammy runtime caused by smoking cigarettes."