diff --git a/code/__DEFINES/atmospherics_defines.dm b/code/__DEFINES/atmospherics_defines.dm index 8c421a9b610..b1be1764c82 100644 --- a/code/__DEFINES/atmospherics_defines.dm +++ b/code/__DEFINES/atmospherics_defines.dm @@ -89,7 +89,7 @@ #define BODYTEMP_AUTORECOVERY_MINIMUM 10 //Minimum amount of kelvin moved toward 310.15K per tick. So long as abs(310.15 - bodytemp) is more than 50. #define BODYTEMP_COLD_DIVISOR 6 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is lower than their body temperature. Make it lower to lose bodytemp faster. #define BODYTEMP_HEAT_DIVISOR 6 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is higher than their body temperature. Make it lower to gain bodytemp faster. -#define BODYTEMP_COOLING_MAX 30 //The maximum number of degrees that your body can cool in 1 tick, when in a cold area. +#define BODYTEMP_COOLING_MAX -30 //The maximum number of degrees that your body can cool in 1 tick, when in a cold area. #define BODYTEMP_HEATING_MAX 30 //The maximum number of degrees that your body can heat up in 1 tick, when in a hot area. #define BODYTEMP_HEAT_DAMAGE_LIMIT (BODYTEMP_NORMAL + 50) // The limit the human body can take before it starts taking damage from heat. diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index bc6ff07ad49..f451b07fb56 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -212,7 +212,6 @@ safety_active = FALSE reagent_capacity = 500 precision = TRUE - cooling_power = 5 w_class = WEIGHT_CLASS_HUGE flags = NODROP //Necessary to ensure that the nozzle and tank never seperate /// A reference to the tank that this nozzle is linked to diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 3859e94b36a..643d26022e4 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -24,8 +24,6 @@ var/safety_active = TRUE /// When `FALSE`, turfs picked from a spray are random. When `TRUE`, it always has at least one water effect per row. var/precision = FALSE - /// Sets the `cooling_temperature` of the water reagent datum inside of the extinguisher when it is refilled. - var/cooling_power = 2 /// If FALSE, extinguishers wont appear prefilled by default var/prefilled = TRUE COOLDOWN_DECLARE(last_use) @@ -132,8 +130,6 @@ to_chat(user, "[src] has been refilled with [transferred] units.") playsound(loc, 'sound/effects/refill.ogg', 50, TRUE, -6) - for(var/datum/reagent/water/R in reagents.reagent_list) - R.cooling_temperature = cooling_power return TRUE /obj/item/extinguisher/proc/extinguisher_spray(atom/A, mob/living/user) diff --git a/code/modules/mob/living/carbon/human/human_life.dm b/code/modules/mob/living/carbon/human/human_life.dm index b450e7e007f..67013a0d2e7 100644 --- a/code/modules/mob/living/carbon/human/human_life.dm +++ b/code/modules/mob/living/carbon/human/human_life.dm @@ -209,7 +209,7 @@ //Place is colder than we are var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to. if(thermal_protection < 1) - bodytemperature += min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX) + bodytemperature += max((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX) else //Place is hotter than we are var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to. diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 4b56925b552..2c820e2156c 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -1074,8 +1074,7 @@ It'll return null if the organ doesn't correspond, so include null checks when u H.sync_lighting_plane_alpha() /datum/species/proc/water_act(mob/living/carbon/human/M, volume, temperature, source, method = REAGENT_TOUCH) - if(abs(temperature - M.bodytemperature) > 10) // If our water and mob temperature varies by more than 10K, cool or/ heat them appropriately. - M.bodytemperature = (temperature + M.bodytemperature) * 0.5 // Approximation for gradual heating or cooling. + M.adjust_bodytemperature(clamp((temperature + M.bodytemperature) * 0.5 - M.bodytemperature, BODYTEMP_COOLING_MAX, BODYTEMP_HEATING_MAX)) // Approximation for gradual heating or cooling. /datum/species/proc/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H) //return TRUE if hit, FALSE if stopped/reflected/etc return TRUE diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm index b2e68977c9b..2a9152c5f23 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm @@ -427,7 +427,6 @@ description = "Carbon Tetrachloride is a foam used for fire suppression." reagent_state = LIQUID color = "#A0A090" - var/cooling_temperature = 3 // more effective than water taste_description = "the inside of a fire extinguisher" /datum/reagent/firefighting_foam/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume) @@ -442,7 +441,7 @@ if(!istype(T)) return new /obj/effect/decal/cleanable/flour/foam(T) //foam mess; clears up quickly. - T.quench(1000, cooling_temperature) + T.quench(1000, 3) // more effective than water /datum/reagent/plasma_dust name = "Plasma Dust" diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index f9ca4a66e09..dd1c38b66e5 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -14,24 +14,21 @@ reagent_state = LIQUID color = "#0064C8" // rgb: 0, 100, 200 taste_description = "water" - var/cooling_temperature = 2 process_flags = ORGANIC | SYNTHETIC drink_icon = "glass_clear" drink_name = "Glass of Water" drink_desc = "The father of all refreshments." - var/water_temperature = 283.15 // As reagents don't have a temperature value, we'll just use 10 celsius. /datum/reagent/water/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume) - M.water_act(volume, water_temperature, src, method) + M.water_act(volume, COLD_WATER_TEMPERATURE, src, method) /datum/reagent/water/reaction_turf(turf/T, volume) - T.water_act(volume, water_temperature, src) + T.water_act(volume, COLD_WATER_TEMPERATURE, src) var/obj/effect/acid/A = (locate(/obj/effect/acid) in T) - if(A) - A.acid_level = max(A.acid_level - volume* 50, 0) + A?.acid_level = max(A.acid_level - volume * 50, 0) /datum/reagent/water/reaction_obj(obj/O, volume) - O.water_act(volume, water_temperature, src) + O.water_act(volume, COLD_WATER_TEMPERATURE, src) /datum/reagent/lube name = "Space Lube"