Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial Tempchanges Revert #3895

Merged
merged 8 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions code/__DEFINES/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@
/// The natural temperature for a body
#define HUMAN_BODYTEMP_NORMAL 310.15
/// This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. This is applied each tick, so long as the mob is alive.
#define HUMAN_BODYTEMP_AUTORECOVERY_DIVISOR 22
#define HUMAN_BODYTEMP_AUTORECOVERY_DIVISOR 11
/// Minimum amount of kelvin moved toward 310K per tick. So long as abs(310.15 - bodytemp) is more than 50.
#define HUMAN_BODYTEMP_AUTORECOVERY_MINIMUM 12
///Similar to the HUMAN_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 HUMAN_BODYTEMP_COLD_DIVISOR 20
#define HUMAN_BODYTEMP_COLD_DIVISOR 10
/// Similar to the HUMAN_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 HUMAN_BODYTEMP_HEAT_DIVISOR 10
/// The maximum number of degrees that your body can cool in 1 tick, due to the environment, when in a cold area.
#define HUMAN_BODYTEMP_COOLING_MAX -100
#define HUMAN_BODYTEMP_COOLING_MAX -20
/// The maximum number of degrees that your body can heat up in 1 tick, due to the environment, when in a hot area.
#define HUMAN_BODYTEMP_HEATING_MAX 30
#define HUMAN_BODYTEMP_HEATING_MAX 10
/// The body temperature limit the human body can take before it starts taking damage from heat.
/// This also affects how fast the body normalises it's temperature when hot.
/// 340k is about 66c, and rather high for a human.
#define HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL + 3)
#define HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL + 30)
/// The body temperature limit the human body can take before it starts taking damage from cold.
/// This also affects how fast the body normalises it's temperature when cold.
/// 270k is about -3c, that is below freezing and would hurt over time.
#define HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL - 8)
#define HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL - 40)


//VOX DEFINES
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Override makes it so the alert is not replaced until cleared by a clear_alert wi

/atom/movable/screen/alert/sweat
name = "Sweating"
desc = "You're sweating and the heat is starting to hurt. Stay hydrated, get somewhere cooler, and take off any insulating clothing like a fire suit."
desc = "You're sweating and the heat is starting to hurt. Get somewhere cooler, and take off any insulating clothing like a fire suit."
icon_state = "sweat"

/atom/movable/screen/alert/shiver
Expand Down
2 changes: 1 addition & 1 deletion code/datums/weather/weather_types/hailstorm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
/// Think of some good solution of how weather should affect monsters and how they should be resistant to things like this
if(isanimal(living_mob))
return
living_mob.adjust_bodytemperature(-rand(1,2))
living_mob.adjust_bodytemperature(-rand(3,6), 243)
living_mob.adjustBruteLoss(rand(2,4))
2 changes: 1 addition & 1 deletion code/datums/weather/weather_types/snowfall.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
thunder_chance = 2

/datum/weather/snowfall/heavy/weather_act(mob/living/living_mob)
living_mob.adjust_bodytemperature(-rand(1,2))
living_mob.adjust_bodytemperature(-rand(2,4), 243)
27 changes: 15 additions & 12 deletions code/game/objects/structures/shower.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
if(isliving(A))
check_heat(A)

if(iscarbon(A)) //WS edit - moth dust from hugging
if(iscarbon(A))
var/mob/living/carbon/C = A
C.mothdust -= 10;

Expand All @@ -130,18 +130,21 @@
qdel(src)

/obj/machinery/shower/proc/check_heat(mob/living/L)
var/mob/living/carbon/C = L

if(current_temperature == SHOWER_FREEZING)
if(iscarbon(L))
C.adjust_bodytemperature(-5, 280)
to_chat(L, "<span class='warning'>[src] is freezing!</span>")
else if(current_temperature == SHOWER_BOILING)
if(iscarbon(L))
C.adjust_bodytemperature(5, 0, 350)
L.adjustFireLoss(5)
to_chat(L, "<span class='danger'>[src] is searing!</span>")
if(iscarbon(L))
var/mob/living/carbon/C = L

switch(current_temperature)
if(SHOWER_FREEZING)
C.adjust_bodytemperature(-3, 280)
to_chat(L, "<span class='warning'>[src] is cold!</span>")
if(SHOWER_BOILING)
C.adjust_bodytemperature(3, 0, 330)
to_chat(L, "<span class='danger'>[src] is hot!</span>")
if(SHOWER_NORMAL)
if(C.bodytemperature >= HUMAN_BODYTEMP_NORMAL)
C.adjust_bodytemperature(-2, HUMAN_BODYTEMP_NORMAL)
else
C.adjust_bodytemperature(2, HUMAN_BODYTEMP_NORMAL)

/obj/effect/mist
name = "mist"
Expand Down
13 changes: 3 additions & 10 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/// Minimum amount of kelvin moved toward normal body temperature per tick.
var/bodytemp_autorecovery_min = HUMAN_BODYTEMP_AUTORECOVERY_MINIMUM
/// The maximum temperature the species is comfortable at. Going above this does not apply any effects, but warns players that the temperture is hot
var/max_temp_comfortable = (HUMAN_BODYTEMP_NORMAL) //20 c will always be below human bodytemp, this just makes it so when it can sustain that its higher
var/max_temp_comfortable = (HUMAN_BODYTEMP_NORMAL + 7) //20 c will always be below human bodytemp, this just makes it so when it can sustain that its higher
/// The minimum temperature the species is comfortable at. Going below this does not apply any effects, but warns players that the temperture is chilly
var/min_temp_comfortable = (HUMAN_BODYTEMP_NORMAL - 1)
var/min_temp_comfortable = (HUMAN_BODYTEMP_NORMAL - 5)
/// This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery.
var/bodytemp_autorecovery_divisor = HUMAN_BODYTEMP_AUTORECOVERY_DIVISOR
///Similar to the autorecovery_divsor, 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 lose bodytemp faster.
Expand Down Expand Up @@ -1955,13 +1955,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
else
H.throw_alert("temp", /atom/movable/screen/alert/sweat, 3)

//Stay hydrated.
if(!(H.mob_biotypes & MOB_ROBOTIC) && H.reagents.has_reagent(/datum/reagent/water) && H.stat != DEAD)
burn_damage -= clamp(H.reagents.get_reagent_amount(/datum/reagent/water) /10, 0, 2)
// if youre dead, no need to sweat?
if(H.stat != DEAD)
burn_damage -= (max(burn_damage - 2.5, 0))

// Apply species and physiology modifiers to heat damage
burn_damage = burn_damage * heatmod * H.physiology.heat_mod

Expand Down Expand Up @@ -2016,7 +2009,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
firemodifier = min(firemodifier, 0)

// this can go below 5 at log 2.5
burn_damage = max(log(2 - firemodifier, (current_human.bodytemperature - current_human.get_body_temp_normal(apply_change=FALSE))) - 2,0)
burn_damage = max(log(2 - firemodifier, (current_human.bodytemperature - current_human.get_body_temp_normal(apply_change=FALSE))) - 5,0)
return burn_damage

/// Handle the air pressure of the environment
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/species_types/kepori.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
bodytemp_heat_damage_limit = HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT + 35
bodytemp_cold_damage_limit = HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT + 3

max_temp_comfortable = HUMAN_BODYTEMP_NORMAL + 15
min_temp_comfortable = HUMAN_BODYTEMP_NORMAL - 1
max_temp_comfortable = HUMAN_BODYTEMP_NORMAL + 40
min_temp_comfortable = HUMAN_BODYTEMP_NORMAL - 3

bodytemp_autorecovery_divisor = HUMAN_BODYTEMP_AUTORECOVERY_DIVISOR - 4

Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/species_types/mothmen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
species_l_leg = /obj/item/bodypart/leg/left/moth
species_r_leg = /obj/item/bodypart/leg/right/moth

min_temp_comfortable = HUMAN_BODYTEMP_NORMAL - 2
bodytemp_cold_damage_limit = HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT - 2
min_temp_comfortable = HUMAN_BODYTEMP_NORMAL - 5
bodytemp_cold_damage_limit = HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT - 5

/datum/species/moth/regenerate_organs(mob/living/carbon/C, datum/species/old_species,replace_current=TRUE, list/excluded_zones, robotic = FALSE)
. = ..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/species_types/vox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
bodytemp_cold_divisor = VOX_BODYTEMP_COLD_DIVISOR
bodytemp_autorecovery_min = VOX_BODYTEMP_AUTORECOVERY_MIN

max_temp_comfortable = HUMAN_BODYTEMP_NORMAL + 1
max_temp_comfortable = HUMAN_BODYTEMP_NORMAL + 10
min_temp_comfortable = HUMAN_BODYTEMP_NORMAL - 20

bodytemp_heat_damage_limit = HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT + 10
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
natural_change = (1 / (thermal_protection + 1)) * natural_change

// Apply the natural stabilization changes
adjust_bodytemperature(natural_change)
adjust_bodytemperature(natural_change, use_insulation=FALSE)

/**
* Get the insulation that is appropriate to the temperature you're being exposed to.
Expand Down Expand Up @@ -635,7 +635,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
* * use_steps (optional) Use the body temp divisors and max change rates
* * hardsuit_fix (optional) num HUMAN_BODYTEMP_NORMAL - H.bodytemperature Use hardsuit override until hardsuits fix is done...
*/
/mob/living/carbon/adjust_bodytemperature(amount, min_temp=0, max_temp=INFINITY, use_insulation=FALSE, use_steps=FALSE, \
/mob/living/carbon/adjust_bodytemperature(amount, min_temp=0, max_temp=INFINITY, use_insulation=TRUE, use_steps=FALSE, \
hardsuit_fix=FALSE)
// apply insulation to the amount of change
if(use_insulation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
damage_type = BURN
nodamage = TRUE
flag = "energy"
temperature = -5 // Cools you down! per hit!
temperature = -25 // Cools you down! per hit!

/obj/projectile/temp/basilisk/super
temperature = -20
temperature = -50
damage = 5
nodamage = FALSE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
name = "ice blast"
damage = 5
nodamage = FALSE
temperature = -2
temperature = -40

/mob/living/simple_animal/hostile/asteroid/ice_demon/OpenFire()
// Sentient ice demons teleporting has been linked to server crashes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
/datum/reagent/consumable/ethanol/vimukti/on_mob_life(mob/living/carbon/M)
M.drowsyness = max(0,M.drowsyness-7)
M.AdjustSleeping(-40)
M.adjust_bodytemperature(-1 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
M.adjust_bodytemperature(-1 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal(), FALSE)
if(!HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
M.adjust_jitter(5, max = 100)
return ..()
Expand Down Expand Up @@ -332,7 +332,7 @@
shot_glass_icon_state = "toxinsspecialglass"

/datum/reagent/consumable/ethanol/toxins_special/on_mob_life(mob/living/M)
M.adjust_bodytemperature(1 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal() + 20) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(1 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal() + 20, FALSE) //310.15 is the normal bodytemp.
return ..()

/datum/reagent/consumable/ethanol/beepsky_smash
Expand Down Expand Up @@ -523,7 +523,7 @@
glass_desc = "Vodka, cream, and ice. No actual antifreeze included, of course."

/datum/reagent/consumable/ethanol/antifreeze/on_mob_life(mob/living/carbon/M)
M.adjust_bodytemperature(1 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal() + 20) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(1 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal() + 20, FALSE) //310.15 is the normal bodytemp.
return ..()

/datum/reagent/consumable/ethanol/barefoot
Expand Down Expand Up @@ -634,7 +634,7 @@
glass_desc = "Vodka with capsaicin for the extra feeling of intense warmth. Difficult to take large swallows."

/datum/reagent/consumable/ethanol/sbiten/on_mob_life(mob/living/carbon/M)
M.adjust_bodytemperature(1 * TEMPERATURE_DAMAGE_COEFFICIENT, 0 , M.dna.species.bodytemp_heat_damage_limit) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(1 * TEMPERATURE_DAMAGE_COEFFICIENT, 0 , M.dna.species.bodytemp_heat_damage_limit, FALSE) //310.15 is the normal bodytemp.
return ..()

/datum/reagent/consumable/ethanol/red_mead
Expand Down Expand Up @@ -671,7 +671,7 @@
glass_desc = "Iced beer, served in a chilled glass. It's cold enough to leave a trail in the air."

/datum/reagent/consumable/ethanol/iced_beer/on_mob_life(mob/living/carbon/M)
M.adjust_bodytemperature(-1 * TEMPERATURE_DAMAGE_COEFFICIENT, T0C) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(-1 * TEMPERATURE_DAMAGE_COEFFICIENT, T0C, FALSE) //310.15 is the normal bodytemp.
return ..()

/datum/reagent/consumable/ethanol/grog
Expand Down Expand Up @@ -1226,7 +1226,7 @@

/datum/reagent/consumable/ethanol/peppermint_patty/on_mob_life(mob/living/carbon/M)
M.apply_status_effect(/datum/status_effect/throat_soothed)
M.adjust_bodytemperature(1 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal())
M.adjust_bodytemperature(1 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal(), FALSE)
..()

/datum/reagent/consumable/ethanol/alexander
Expand Down Expand Up @@ -1402,7 +1402,7 @@


/datum/reagent/consumable/ethanol/branca_menta/on_mob_life(mob/living/carbon/M)
M.adjust_bodytemperature(-1 * TEMPERATURE_DAMAGE_COEFFICIENT, T0C)
M.adjust_bodytemperature(-1 * TEMPERATURE_DAMAGE_COEFFICIENT, T0C, FALSE)
return ..()

/datum/reagent/consumable/ethanol/branca_menta/on_mob_metabolize(mob/living/M)
Expand Down Expand Up @@ -1565,14 +1565,6 @@
glass_name = "Inner Fire"
glass_desc = "Not at all made by the Saint Roumain, this drink still bases itself as a test of will used by the hunters to test their endurance to intense heat... and alcohol."

/datum/reagent/consumable/ethanol/mauna_loa/on_mob_life(mob/living/carbon/M)
// Heats the user up while the reagent is in the body. Occasionally makes you burst into flames.
M.adjust_bodytemperature(2 * TEMPERATURE_DAMAGE_COEFFICIENT)
if (prob(5))
M.adjust_fire_stacks(1)
M.IgniteMob()
..()

/datum/reagent/consumable/ethanol/painkiller
name = "Painkiller"
description = "Dulls your pain. Your emotional pain, that is."
Expand Down
Loading
Loading