between() -> clamp() & swaps args 1 and 2 in uses

This commit is contained in:
Spookerton
2024-02-05 15:47:07 +00:00
parent dfac4a77fe
commit ebbf0e33fb
68 changed files with 137 additions and 146 deletions
+1 -1
View File
@@ -163,7 +163,7 @@
qdel(hotspot)
if (environment && environment.temperature > min_temperature) // Abstracted as steam or something
var/removed_heat = between(0, volume * WATER_LATENT_HEAT, -environment.get_thermal_energy_change(min_temperature))
var/removed_heat = clamp(volume * WATER_LATENT_HEAT, 0, -environment.get_thermal_energy_change(min_temperature))
environment.add_thermal_energy(-removed_heat)
if (prob(5))
T.visible_message("<span class='warning'>The water sizzles as it lands on \the [T]!</span>")