From e549a22bbaee097608151d87baf6cd3ceefd7bfe Mon Sep 17 00:00:00 2001 From: mwerezak Date: Tue, 28 Oct 2014 22:13:42 -0400 Subject: [PATCH] Removes world print, re-adds react() call Also removes checks for if(W.reagent) in extinguisher code, as that is being handled separately. --- code/game/mecha/equipment/tools/tools.dm | 2 -- code/game/objects/items/weapons/extinguisher.dm | 1 - code/modules/reagents/Chemistry-Reagents.dm | 17 +++++++++-------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index cb0a2a4a21a..5a03f9882e4 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -220,8 +220,6 @@ step_towards(W,my_target) if(!W) return - if(!W.reagents) - break var/turf/W_turf = get_turf(W) W.reagents.reaction(W_turf) for(var/atom/atm in W_turf) diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 6b6723edd83..2406b7232b2 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -130,7 +130,6 @@ for(var/b=0, b<5, b++) step_towards(W,my_target) if(!W) return - if(!W.reagents) break W.reagents.reaction(get_turf(W)) for(var/atom/atm in get_turf(W)) if(!W) return diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 24279cec8ae..25d6b35e609 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -196,22 +196,16 @@ datum reaction_turf(var/turf/simulated/T, var/volume) if (!istype(T)) return - //Put out fires. Temperature is handled after - var/hotspot = (locate(/obj/fire) in T) - if(hotspot) - //lowertemp.react() - del(hotspot) - //If the turf is hot enough, remove some heat var/datum/gas_mixture/environment = T.return_air() var/min_temperature = T0C + 100 //100C, the boiling point of water + 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)) - world << "water/reaction_turf: Initial temperature = [environment.temperature]" environment.add_thermal_energy(-removed_heat) - world << "water/reaction_turf: Final temperature = [environment.temperature - T0C]" if (prob(5)) T.visible_message("\red The water sizzles as it lands on \the [T]!") + else //otherwise, the turf gets wet if(volume >= 3) if(T.wet >= 1) return @@ -230,6 +224,13 @@ datum if(T.wet_overlay) T.overlays -= T.wet_overlay T.wet_overlay = null + + //Put out fires. + var/hotspot = (locate(/obj/fire) in T) + if(hotspot) + del(hotspot) + if(environment) + environment.react() //react at the new temperature reaction_obj(var/obj/O, var/volume) var/turf/T = get_turf(O)