Skip to content

Commit

Permalink
temp default sanity
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikafox committed Dec 22, 2024
1 parent e0d829d commit 60c7ba3
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 58 deletions.
28 changes: 14 additions & 14 deletions code/game/objects/structures/shower.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,21 @@
qdel(src)

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

switch(current_temperature)
if(SHOWER_FREEZING)
if(iscarbon(L))
C.adjust_bodytemperature(-2, 280)
to_chat(L, "<span class='warning'>[src] is cold!</span>")
if(SHOWER_BOILING)
if(iscarbon(L))
C.adjust_bodytemperature(2, 0, 330)
to_chat(L, "<span class='danger'>[src] is hot!</span>")
if(SHOWER_NORMAL)
if(iscarbon(L))
C.adjust_bodytemperature(1, HUMAN_BODYTEMP_NORMAL)
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
2 changes: 1 addition & 1 deletion 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
22 changes: 7 additions & 15 deletions code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/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.Jitter(5)
return ..()
Expand Down Expand Up @@ -655,7 +655,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
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 @@ -846,7 +846,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
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 @@ -959,7 +959,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
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 @@ -996,7 +996,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
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 @@ -1625,7 +1625,7 @@ All effects don't start immediately, but rather get worse over time; the rate is

/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 @@ -1809,7 +1809,7 @@ All effects don't start immediately, but rather get worse over time; the rate is


/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 @@ -2119,14 +2119,6 @@ All effects don't start immediately, but rather get worse over time; the rate is
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
46 changes: 23 additions & 23 deletions code/modules/reagents/chemistry/reagents/drink_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
M.drowsyness = max(0,M.drowsyness-3)
M.AdjustSleeping(-40)
//310.15 is the normal bodytemp.
M.adjust_bodytemperature(3 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal())
M.adjust_bodytemperature(3 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal(), FALSE)
if(holder.has_reagent(/datum/reagent/consumable/frostoil))
holder.remove_reagent(/datum/reagent/consumable/frostoil, 5)
..()
Expand All @@ -280,7 +280,7 @@
M.AdjustSleeping(-20)
if(M.getToxLoss() && prob(20))
M.adjustToxLoss(-1, 0)
M.adjust_bodytemperature(2 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal())
M.adjust_bodytemperature(2 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal(), FALSE)
..()
. = 1

Expand Down Expand Up @@ -330,7 +330,7 @@
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
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)
..()
. = 1

Expand All @@ -354,7 +354,7 @@
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
M.AdjustSleeping(-60)
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)
M.adjustToxLoss(1*REM, 0)
..()
. = TRUE
Expand All @@ -375,7 +375,7 @@
M.AdjustSleeping(-40)
if(M.getToxLoss() && prob(20))
M.adjustToxLoss(-1, 0)
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)
..()
. = 1

Expand All @@ -390,7 +390,7 @@

/datum/reagent/consumable/space_cola/on_mob_life(mob/living/carbon/M)
M.drowsyness = max(0,M.drowsyness-5)
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)
..()

/datum/reagent/consumable/crosstalk
Expand Down Expand Up @@ -431,7 +431,7 @@
/datum/reagent/consumable/comet_trail/on_mob_life(mob/living/carbon/M)
M.drowsyness = max(0,M.drowsyness-7)
M.AdjustSleeping(-20)
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)
M.Jitter(5)
..()
. = 1
Expand All @@ -447,7 +447,7 @@

/datum/reagent/consumable/tadrixx/on_mob_life(mob/living/carbon/M)
M.drowsyness = max(0,M.drowsyness-6)
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)
..()

/datum/reagent/consumable/space_up
Expand All @@ -461,7 +461,7 @@


/datum/reagent/consumable/space_up/on_mob_life(mob/living/carbon/M)
M.adjust_bodytemperature(-2 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
M.adjust_bodytemperature(-2 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal(), FALSE)
..()

/datum/reagent/consumable/molten
Expand All @@ -476,9 +476,9 @@
/datum/reagent/consumable/molten/on_mob_life(mob/living/carbon/M)
M.heal_bodypart_damage(1,1,0)
if(M.bodytemperature > M.get_body_temp_normal(apply_change=FALSE))
M.adjust_bodytemperature(-2 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal(apply_change=FALSE))
M.adjust_bodytemperature(-2 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal(apply_change=FALSE), FALSE)
else if(M.bodytemperature < (M.get_body_temp_normal(apply_change=FALSE) + 1))
M.adjust_bodytemperature(2 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal(apply_change=FALSE))
M.adjust_bodytemperature(2 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal(apply_change=FALSE), FALSE)
..()

/datum/reagent/consumable/molten/plasma_fizz
Expand Down Expand Up @@ -509,7 +509,7 @@


/datum/reagent/consumable/lemon_lime/on_mob_life(mob/living/carbon/M)
M.adjust_bodytemperature(-2 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
M.adjust_bodytemperature(-2 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal(), FALSE)
..()


Expand All @@ -530,7 +530,7 @@
You feel as though a great secret of the universe has been made known to you...</span>")

/datum/reagent/consumable/pacfuel/on_mob_life(mob/living/carbon/M)
M.adjust_bodytemperature(-2 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
M.adjust_bodytemperature(-2 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal(), FALSE)
if(prob(10))
M?.mind.adjust_experience(/datum/skill/gaming, 5)
..()
Expand All @@ -545,7 +545,7 @@
glass_desc = "It's hard to imagine all those fruits getting condensed into a cup like this."

/datum/reagent/consumable/shoal_punch/on_mob_life(mob/living/carbon/M)
M.adjust_bodytemperature(-2 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
M.adjust_bodytemperature(-2 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal(), FALSE)
..()
/datum/reagent/consumable/sodawater
name = "Soda Water"
Expand All @@ -559,7 +559,7 @@
/datum/reagent/consumable/sodawater/on_mob_life(mob/living/carbon/M)
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
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)
..()

/datum/reagent/consumable/tonic
Expand All @@ -575,7 +575,7 @@
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
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)
..()
. = 1

Expand All @@ -594,7 +594,7 @@
M.dizziness +=1
M.drowsyness = 0
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)
..()

/datum/reagent/consumable/xeno_energy/on_mob_metabolize(mob/living/L)
Expand All @@ -617,7 +617,7 @@
glass_desc = "Generally, you're supposed to put something else in there, too..."

/datum/reagent/consumable/ice/on_mob_life(mob/living/carbon/M)
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)
..()

/datum/reagent/consumable/soy_latte
Expand All @@ -639,7 +639,7 @@
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
M.SetSleeping(0)
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)
if(M.getBruteLoss() && prob(20))
M.heal_bodypart_damage(1,0, 0)
..()
Expand All @@ -664,7 +664,7 @@
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
M.SetSleeping(0)
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)
if(M.getBruteLoss() && prob(20))
M.heal_bodypart_damage(1,0, 0)
..()
Expand Down Expand Up @@ -788,7 +788,7 @@
glass_desc = "It's grape soda!"

/datum/reagent/consumable/grape_soda/on_mob_life(mob/living/carbon/M)
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)
..()

/datum/reagent/consumable/milk/chocolate_milk
Expand Down Expand Up @@ -817,7 +817,7 @@
glass_desc = "A favorite winter drink from the Solar Confederation. Good for warming yourself up."

/datum/reagent/consumable/hot_coco/on_mob_life(mob/living/carbon/M)
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/hot_coco/on_mob_life(mob/living/carbon/M)
Expand Down Expand Up @@ -884,7 +884,7 @@
glass_desc = "A classic vanilla flavored soft drink."

/datum/reagent/consumable/cream_soda/on_mob_life(mob/living/carbon/M)
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)
..()

/datum/reagent/consumable/sol_dry
Expand Down
4 changes: 2 additions & 2 deletions code/modules/reagents/chemistry/reagents/food_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@
taste_description = "your imprisonment"

/datum/reagent/consumable/hot_ramen/on_mob_life(mob/living/carbon/M)
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/hell_ramen
Expand Down Expand Up @@ -776,7 +776,7 @@
..()

/datum/reagent/consumable/pyre_elementum/on_mob_life(mob/living/carbon/M)
M.adjust_bodytemperature(2 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal()) // Doesn't kill you like capsaicin
M.adjust_bodytemperature(2 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal(), FALSE) // Doesn't kill you like capsaicin
if(!ingested) // Unless you didn't eat it
M.adjustFireLoss(0.25*REM, 0)
..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/chemistry/reagents/toxin_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
if(holder.has_reagent(/datum/reagent/medicine/epinephrine))
holder.remove_reagent(/datum/reagent/medicine/epinephrine, 2*REM)
M.adjustPlasma(20)
M.adjust_bodytemperature(-2 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
M.adjust_bodytemperature(-2 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal(), FALSE)
return ..()

/datum/reagent/toxin/lexorin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
breakaway_flask_icon_state = "baflaskicewine"

/datum/reagent/consumable/ethanol/trickwine/ice_wine/on_mob_life(mob/living/M)
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal(), FALSE)
M.adjustFireLoss(-0.25)
if(prob(10))
to_chat(M, span_notice("Sweat runs down your body."))
Expand Down Expand Up @@ -109,7 +109,7 @@
breakaway_flask_icon_state = "baflaskhearthwine"

/datum/reagent/consumable/ethanol/trickwine/hearth_wine/on_mob_life(mob/living/M)
M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal(), FALSE)
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.heal_bleeding(0.25)
Expand Down

0 comments on commit 60c7ba3

Please sign in to comment.