[MIRROR] Fixes negative bodytemp in some cases and shivering not doing anything unless you're already very cold (#5674)

* Fixes negative bodytemp in some cases and shivering not doing anything unless you're already very cold (#35796)

* - Stop subtracting from bodytemp please
- Also fixes shivering

* - Jesus christ why did you make me do this

* - missed one

* Fixes negative bodytemp in some cases and shivering not doing anything unless you're already very cold
This commit is contained in:
CitadelStationBot
2018-02-23 17:42:57 -06:00
committed by Poojawa
parent f3b42842ad
commit 567c7fad8d
29 changed files with 114 additions and 130 deletions
@@ -54,7 +54,7 @@ Bonus
/datum/symptom/fever/proc/Heat(mob/living/M, datum/disease/advance/A)
var/get_heat = 6 * power
if(!unsafe)
M.bodytemperature = min(M.bodytemperature + (get_heat * A.stage), BODYTEMP_HEAT_DAMAGE_LIMIT - 1)
M.adjust_bodytemperature(get_heat * A.stage, 0, BODYTEMP_HEAT_DAMAGE_LIMIT - 1)
else
M.bodytemperature += (get_heat * A.stage)
M.adjust_bodytemperature(get_heat * A.stage)
return 1
@@ -384,11 +384,11 @@
to_chat(M, "<span class='notice'>You feel yourself absorbing plasma inside and around you...</span>")
if(M.bodytemperature > BODYTEMP_NORMAL)
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (20 * temp_rate * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(-20 * temp_rate * TEMPERATURE_DAMAGE_COEFFICIENT,BODYTEMP_NORMAL)
if(prob(5))
to_chat(M, "<span class='notice'>You feel less hot.</span>")
else if(M.bodytemperature < (BODYTEMP_NORMAL + 1))
M.bodytemperature = min(BODYTEMP_NORMAL, M.bodytemperature + (20 * temp_rate * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(20 * temp_rate * TEMPERATURE_DAMAGE_COEFFICIENT,0,BODYTEMP_NORMAL)
if(prob(5))
to_chat(M, "<span class='notice'>You feel warmer.</span>")
@@ -47,13 +47,13 @@ Bonus
to_chat(M, "<span class='warning'>[pick("You feel cold.", "You shiver.")]</span>")
else
to_chat(M, "<span class='userdanger'>[pick("You feel your blood run cold.", "You feel ice in your veins.", "You feel like you can't heat up.", "You shiver violently." )]</span>")
if(M.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT || unsafe)
if(M.bodytemperature > BODYTEMP_COLD_DAMAGE_LIMIT || unsafe)
Chill(M, A)
/datum/symptom/shivering/proc/Chill(mob/living/M, datum/disease/advance/A)
var/get_cold = 6 * power
if(!unsafe)
M.bodytemperature = min(M.bodytemperature - (get_cold * A.stage), BODYTEMP_COLD_DAMAGE_LIMIT + 1)
else
M.bodytemperature -= (get_cold * A.stage)
var/limit = BODYTEMP_COLD_DAMAGE_LIMIT + 1
if(unsafe)
limit = 0
M.adjust_bodytemperature(-get_cold * A.stage, limit)
return 1
+2 -2
View File
@@ -14,7 +14,7 @@
..()
switch(stage)
if(2)
affected_mob.bodytemperature -= 10
affected_mob.adjust_bodytemperature(-10)
if(prob(1) && prob(10))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
@@ -28,7 +28,7 @@
if(prob(5))
to_chat(affected_mob, "<span class='danger'>You feel stiff.</span>")
if(3)
affected_mob.bodytemperature -= 20
affected_mob.adjust_bodytemperature(-20)
if(prob(1))
affected_mob.emote("sneeze")
if(prob(1))
+2 -2
View File
@@ -15,7 +15,7 @@
..()
switch(stage)
if(2)
affected_mob.bodytemperature += 10
affected_mob.adjust_bodytemperature(10)
if(prob(5))
affected_mob.emote("sneeze")
if(prob(5))
@@ -25,7 +25,7 @@
affected_mob.take_bodypart_damage(0,5)
if(3)
affected_mob.bodytemperature += 20
affected_mob.adjust_bodytemperature(20)
if(prob(5))
affected_mob.emote("sneeze")
if(prob(5))
+1 -1
View File
@@ -55,6 +55,6 @@
affected_mob.nutrition = max(affected_mob.nutrition - 100, 0)
if(prob(15))
to_chat(affected_mob, "<span class='danger'>[pick("You feel uncomfortably hot...", "You feel like unzipping your jumpsuit", "You feel like taking off some clothes...")]</span>")
affected_mob.bodytemperature += 40
affected_mob.adjust_bodytemperature(40)
return
+1 -1
View File
@@ -28,7 +28,7 @@
if(!owner.stat)
to_chat(owner, "The cube melts!")
owner.cut_overlay(cube)
owner.bodytemperature += 100
owner.adjust_bodytemperature(100)
owner.update_canmove()
/datum/status_effect/freon/watcher
@@ -24,5 +24,5 @@
/datum/weather/snow_storm/weather_act(mob/living/L)
L.bodytemperature -=(rand(5,15))
L.adjust_bodytemperature(-rand(5,15))
@@ -47,5 +47,5 @@
addtimer(CALLBACK(F, /turf/open/floor.proc/MakeDry, TURF_WET_PERMAFROST), rand(3000, 3100))
for(var/mob/living/carbon/L in T)
L.adjustStaminaLoss(stamina_damage)
L.bodytemperature -= 230
L.adjust_bodytemperature(-230)
qdel(src)
+1 -1
View File
@@ -105,7 +105,7 @@
/obj/structure/trap/chill/trap_effect(mob/living/L)
to_chat(L, "<span class='danger'><B>You're frozen solid!</B></span>")
L.Knockdown(20)
L.bodytemperature -= 300
L.adjust_bodytemperature(-300)
L.apply_status_effect(/datum/status_effect/freon)
+2 -2
View File
@@ -421,10 +421,10 @@
/obj/machinery/shower/proc/check_heat(mob/living/carbon/C)
if(watertemp == "freezing")
C.bodytemperature = max(80, C.bodytemperature - 80)
C.adjust_bodytemperature(-80, 80)
to_chat(C, "<span class='warning'>The water is freezing!</span>")
else if(watertemp == "boiling")
C.bodytemperature = min(500, C.bodytemperature + 35)
C.adjust_bodytemperature(35, 0, 500)
C.adjustFireLoss(5)
to_chat(C, "<span class='danger'>The water is searing!</span>")
@@ -232,7 +232,7 @@
if(target && cooldown < world.time)
if(I.is_hot())
to_chat(target, "<span class='userdanger'>You suddenly feel very hot</span>")
target.bodytemperature += 50
target.adjust_bodytemperature(50)
GiveHint(target)
else if(is_pointed(I))
to_chat(target, "<span class='userdanger'>You feel a stabbing pain in [parse_zone(user.zone_selected)]!</span>")
@@ -219,7 +219,7 @@
var/heat = ((1 - cold_protection) * 0.1 + conduction_coefficient) * temperature_delta * (air_heat_capacity * heat_capacity / (air_heat_capacity + heat_capacity))
air1.temperature = max(air1.temperature - heat / air_heat_capacity, TCMB)
mob_occupant.bodytemperature = max(mob_occupant.bodytemperature + heat / heat_capacity, TCMB)
mob_occupant.adjust_bodytemperature(heat / heat_capacity, TCMB)
air1.gases[/datum/gas/oxygen][MOLES] = max(0,air1.gases[/datum/gas/oxygen][MOLES] - 0.5 / efficiency) // Magically consume gas? Why not, we run on cryo magic.
air1.garbage_collect()
@@ -218,7 +218,7 @@
L.adjustFireLoss(2)
if(L)
L.adjust_fire_stacks(20) //dipping into a stream of plasma would probably make you more flammable than usual
L.bodytemperature -=(rand(50,65)) //its cold, man
L.adjust_bodytemperature(-rand(50,65)) //its cold, man
if(ishuman(L))//are they a carbon?
var/list/plasma_parts = list()//a list of the organic parts to be turned into plasma limbs
var/list/robo_parts = list()//keep a reference of robotic parts so we know if we can turn them into a plasmaman
+1 -1
View File
@@ -88,7 +88,7 @@
if(held_mob.is_holding(src))
if(istype(held_mob) && held_mob.gloves)
return
held_mob.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT
held_mob.adjust_bodytemperature(15 * TEMPERATURE_DAMAGE_COEFFICIENT)
if(prob(10))
to_chat(held_mob, "<span class='warning'>Your hand holding [src] burns!</span>")
else
@@ -65,9 +65,9 @@
//Place is hotter than we are
var/thermal_protection = heat_protection //This returns a 0 - 1 value, which corresponds to the percentage of heat protection.
if(thermal_protection < 1)
bodytemperature += (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
adjust_bodytemperature((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR))
else
bodytemperature += 1 * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
adjust_bodytemperature(1 * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR))
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
//Body temperature is too hot.
+1 -1
View File
@@ -50,5 +50,5 @@
/mob/living/carbon/alien/handle_fire()//Aliens on fire code
if(..())
return
bodytemperature += BODYTEMP_HEATING_MAX //If you're on fire, you heat up!
adjust_bodytemperature(BODYTEMP_HEATING_MAX) //If you're on fire, you heat up!
return
@@ -1633,15 +1633,15 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(loc_temp < H.bodytemperature) //Place is colder than we are
thermal_protection -= H.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(H.bodytemperature < BODYTEMP_NORMAL) //we're cold, insulation helps us retain body heat and will reduce the heat we lose to the environment
H.bodytemperature += (thermal_protection+1)*natural + max(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_COLD_DIVISOR, BODYTEMP_COOLING_MAX)
H.adjust_bodytemperature((thermal_protection+1)*natural + max(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_COLD_DIVISOR, BODYTEMP_COOLING_MAX))
else //we're sweating, insulation hinders our ability to reduce heat - and it will reduce the amount of cooling you get from the environment
H.bodytemperature += natural*(1/(thermal_protection+1)) + max((thermal_protection * (loc_temp - H.bodytemperature) + BODYTEMP_NORMAL - H.bodytemperature) / BODYTEMP_COLD_DIVISOR , BODYTEMP_COOLING_MAX) //Extra calculation for hardsuits to bleed off heat
H.adjust_bodytemperature(natural*(1/(thermal_protection+1)) + max((thermal_protection * (loc_temp - H.bodytemperature) + BODYTEMP_NORMAL - H.bodytemperature) / BODYTEMP_COLD_DIVISOR , BODYTEMP_COOLING_MAX)) //Extra calculation for hardsuits to bleed off heat
else //Place is hotter than we are
thermal_protection -= H.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.
if(H.bodytemperature < BODYTEMP_NORMAL) //and we're cold, insulation enhances our ability to retain body heat but reduces the heat we get from the environment
H.bodytemperature += (thermal_protection+1)*natural + min(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX)
H.adjust_bodytemperature((thermal_protection+1)*natural + min(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX))
else //we're sweating, insulation hinders out ability to reduce heat - but will reduce the amount of heat we get from the environment
H.bodytemperature += natural*(1/(thermal_protection+1)) + min(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX)
H.adjust_bodytemperature(natural*(1/(thermal_protection+1)) + min(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX))
// +/- 50 degrees from 310K is the 'safe' zone, where no damage is dealt.
if(H.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !(RESISTHOT in species_traits))
@@ -1768,9 +1768,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT && !no_protection)
return
if(thermal_protection >= FIRE_SUIT_MAX_TEMP_PROTECT && !no_protection)
H.bodytemperature += 11
H.adjust_bodytemperature(11)
else
H.bodytemperature += (BODYTEMP_HEATING_MAX + (H.fire_stacks * 12))
H.adjust_bodytemperature(BODYTEMP_HEATING_MAX + (H.fire_stacks * 12))
/datum/species/proc/CanIgniteMob(mob/living/carbon/human/H)
if(NOFIRE in species_traits)
@@ -65,13 +65,13 @@
var/loc_temp = get_temperature(environment)
if(stat != DEAD)
bodytemperature += natural_bodytemperature_stabilization()
adjust_bodytemperature(natural_bodytemperature_stabilization())
if(!on_fire) //If you're on fire, you do not heat up or cool down based on surrounding gases
if(loc_temp < bodytemperature)
bodytemperature += max((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR, BODYTEMP_COOLING_MAX)
adjust_bodytemperature(max((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR, BODYTEMP_COOLING_MAX))
else
bodytemperature += min((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX)
adjust_bodytemperature(min((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX))
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
@@ -161,5 +161,5 @@
if(!(I.resistance_flags & FIRE_PROOF))
I.take_damage(fire_stacks, BURN, "fire", 0)
bodytemperature += BODYTEMP_HEATING_MAX
adjust_bodytemperature(BODYTEMP_HEATING_MAX)
@@ -89,7 +89,7 @@
//domestication
var/tame = 0
var/my_z // I don't want to confuse this with client registered_z
var/my_z // I don't want to confuse this with client registered_z
/mob/living/simple_animal/Initialize()
. = ..()
@@ -234,7 +234,7 @@
if( abs(areatemp - bodytemperature) > 5)
var/diff = areatemp - bodytemperature
diff = diff / 5
bodytemperature += diff
adjust_bodytemperature(diff)
if(!environment_is_safe(environment))
adjustHealth(unsuitable_atmos_damage)
@@ -112,7 +112,7 @@
var/loc_temp = get_temperature(environment)
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
adjust_bodytemperature(adjust_body_temperature(bodytemperature, loc_temp, 1))
//Account for massive pressure differences
+5 -1
View File
@@ -238,7 +238,11 @@
/mob/proc/set_disgust(amount)
return
/////////////////////////////////// TEMPERATURE ////////////////////////////////////
/mob/proc/adjust_bodytemperature(amount,min_temp=0,max_temp=INFINITY)
if(bodytemperature > min_temp && bodytemperature < max_temp)
bodytemperature = CLAMP(bodytemperature + amount,min_temp,max_temp)
@@ -149,8 +149,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/thirteenloko/on_mob_life(mob/living/M)
M.drowsyness = max(0,M.drowsyness-7)
M.AdjustSleeping(-40)
if (M.bodytemperature > BODYTEMP_NORMAL)
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
M.Jitter(5)
return ..()
@@ -541,8 +540,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(var/mob/living/M as mob)
if (M.bodytemperature < (BODYTEMP_NORMAL + 20))
M.bodytemperature = min((BODYTEMP_NORMAL + 20), M.bodytemperature + (15 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(15 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL + 20) //310.15 is the normal bodytemp.
return ..()
/datum/reagent/consumable/ethanol/beepsky_smash
@@ -721,8 +719,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "The ultimate refreshment."
/datum/reagent/consumable/ethanol/antifreeze/on_mob_life(mob/living/M)
if (M.bodytemperature < (BODYTEMP_NORMAL + 20))
M.bodytemperature = min((BODYTEMP_NORMAL + 20), M.bodytemperature + (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(20 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL + 20) //310.15 is the normal bodytemp.
return ..()
/datum/reagent/consumable/ethanol/barefoot
@@ -835,8 +832,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A spicy mix of Vodka and Spice. Very hot."
/datum/reagent/consumable/ethanol/sbiten/on_mob_life(mob/living/M)
if (M.bodytemperature < BODYTEMP_HEAT_DAMAGE_LIMIT)
M.bodytemperature = min(BODYTEMP_HEAT_DAMAGE_LIMIT, M.bodytemperature + (50 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(50 * TEMPERATURE_DAMAGE_COEFFICIENT, 0 ,BODYTEMP_HEAT_DAMAGE_LIMIT) //310.15 is the normal bodytemp.
return ..()
/datum/reagent/consumable/ethanol/red_mead
@@ -874,8 +870,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A beer so frosty, the air around it freezes."
/datum/reagent/consumable/ethanol/iced_beer/on_mob_life(mob/living/M)
if(M.bodytemperature > T0C)
M.bodytemperature = max(T0C, M.bodytemperature - (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(-20 * TEMPERATURE_DAMAGE_COEFFICIENT, T0C) //310.15 is the normal bodytemp.
return ..()
/datum/reagent/consumable/ethanol/grog
@@ -280,8 +280,8 @@
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
M.AdjustSleeping(-40, FALSE)
if (M.bodytemperature < BODYTEMP_NORMAL)//310.15 is the normal bodytemp.
M.bodytemperature = min(BODYTEMP_NORMAL, M.bodytemperature + (25 * TEMPERATURE_DAMAGE_COEFFICIENT))
//310.15 is the normal bodytemp.
M.adjust_bodytemperature(25 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
if(holder.has_reagent("frostoil"))
holder.remove_reagent("frostoil", 5)
..()
@@ -305,8 +305,7 @@
M.AdjustSleeping(-20, FALSE)
if(M.getToxLoss() && prob(20))
M.adjustToxLoss(-1, 0)
if (M.bodytemperature < BODYTEMP_NORMAL) //310.15 is the normal bodytemp.
M.bodytemperature = min(BODYTEMP_NORMAL, M.bodytemperature + (20 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(20 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
..()
. = 1
@@ -342,8 +341,7 @@
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
M.AdjustSleeping(-40, FALSE)
if (M.bodytemperature > BODYTEMP_NORMAL)//310.15 is the normal bodytemp.
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
M.Jitter(5)
..()
. = 1
@@ -365,8 +363,7 @@
M.AdjustSleeping(-40, FALSE)
if(M.getToxLoss() && prob(20))
M.adjustToxLoss(-1, 0)
if (M.bodytemperature > BODYTEMP_NORMAL)//310.15 is the normal bodytemp.
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
..()
. = 1
@@ -382,8 +379,7 @@
/datum/reagent/consumable/space_cola/on_mob_life(mob/living/M)
M.drowsyness = max(0,M.drowsyness-5)
if (M.bodytemperature > BODYTEMP_NORMAL)//310.15 is the normal bodytemp.
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
..()
/datum/reagent/consumable/nuka_cola
@@ -414,8 +410,7 @@
M.dizziness +=5
M.drowsyness = 0
M.AdjustSleeping(-40, FALSE)
if (M.bodytemperature > BODYTEMP_NORMAL)//310.15 is the normal bodytemp.
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
..()
. = 1
@@ -432,8 +427,7 @@
/datum/reagent/consumable/spacemountainwind/on_mob_life(mob/living/M)
M.drowsyness = max(0,M.drowsyness-7)
M.AdjustSleeping(-20, FALSE)
if (M.bodytemperature > BODYTEMP_NORMAL)
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
M.Jitter(5)
..()
. = 1
@@ -450,8 +444,7 @@
/datum/reagent/consumable/dr_gibb/on_mob_life(mob/living/M)
M.drowsyness = max(0,M.drowsyness-6)
if (M.bodytemperature > BODYTEMP_NORMAL)
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
..()
/datum/reagent/consumable/space_up
@@ -466,8 +459,7 @@
/datum/reagent/consumable/space_up/on_mob_life(mob/living/M)
if (M.bodytemperature > BODYTEMP_NORMAL)
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (8 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(-8 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
..()
/datum/reagent/consumable/lemon_lime
@@ -482,8 +474,7 @@
/datum/reagent/consumable/lemon_lime/on_mob_life(mob/living/M)
if (M.bodytemperature > BODYTEMP_NORMAL)
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (8 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(-8 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
..()
/datum/reagent/consumable/pwr_game
@@ -497,8 +488,7 @@
glass_desc = "Goes well with a Vlad's salad."
/datum/reagent/consumable/pwr_game/on_mob_life(mob/living/M)
if (M.bodytemperature > BODYTEMP_NORMAL)
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (8 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(-8 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
..()
/datum/reagent/consumable/shamblers
@@ -512,8 +502,7 @@
glass_desc = "Mmm mm, shambly."
/datum/reagent/consumable/shamblers/on_mob_life(mob/living/M)
if (M.bodytemperature > BODYTEMP_NORMAL)
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (8 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310.15 is the normal bodytemp.
M.adjust_bodytemperature(-8 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
..()
/datum/reagent/consumable/sodawater
name = "Soda Water"
@@ -528,8 +517,7 @@
/datum/reagent/consumable/sodawater/on_mob_life(mob/living/M)
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
if (M.bodytemperature > BODYTEMP_NORMAL)
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
..()
/datum/reagent/consumable/tonic
@@ -546,8 +534,7 @@
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
M.AdjustSleeping(-40, FALSE)
if (M.bodytemperature > BODYTEMP_NORMAL)
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
..()
. = 1
@@ -563,7 +550,7 @@
glass_desc = "Generally, you're supposed to put something else in there too..."
/datum/reagent/consumable/ice/on_mob_life(mob/living/M)
M.bodytemperature = max( M.bodytemperature - 5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0)
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
..()
/datum/reagent/consumable/soy_latte
@@ -580,8 +567,7 @@
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
M.SetSleeping(0, FALSE)
if (M.bodytemperature < BODYTEMP_NORMAL)//310.15 is the normal bodytemp.
M.bodytemperature = min(BODYTEMP_NORMAL, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
M.Jitter(5)
if(M.getBruteLoss() && prob(20))
M.heal_bodypart_damage(1,0, 0)
@@ -602,8 +588,7 @@
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
M.SetSleeping(0, FALSE)
if (M.bodytemperature < BODYTEMP_NORMAL)//310.15 is the normal bodytemp.
M.bodytemperature = min(BODYTEMP_NORMAL, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
M.Jitter(5)
if(M.getBruteLoss() && prob(20))
M.heal_bodypart_damage(1,0, 0)
@@ -184,25 +184,27 @@
taste_mult = 1.5
/datum/reagent/consumable/capsaicin/on_mob_life(mob/living/M)
var/heating = 0
switch(current_cycle)
if(1 to 15)
M.bodytemperature += 5 * TEMPERATURE_DAMAGE_COEFFICIENT
heating = 5 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("cryostylane"))
holder.remove_reagent("cryostylane", 5)
if(isslime(M))
M.bodytemperature += rand(5,20)
heating = rand(5,20)
if(15 to 25)
M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT
heating = 10 * TEMPERATURE_DAMAGE_COEFFICIENT
if(isslime(M))
M.bodytemperature += rand(10,20)
heating = rand(10,20)
if(25 to 35)
M.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT
heating = 15 * TEMPERATURE_DAMAGE_COEFFICIENT
if(isslime(M))
M.bodytemperature += rand(15,20)
heating = rand(15,20)
if(35 to INFINITY)
M.bodytemperature += 20 * TEMPERATURE_DAMAGE_COEFFICIENT
heating = 20 * TEMPERATURE_DAMAGE_COEFFICIENT
if(isslime(M))
M.bodytemperature += rand(20,25)
heating = rand(20,25)
M.adjust_bodytemperature(heating)
..()
/datum/reagent/consumable/frostoil
@@ -213,31 +215,31 @@
taste_description = "mint"
/datum/reagent/consumable/frostoil/on_mob_life(mob/living/M)
if(M.bodytemperature > 50)
switch(current_cycle)
if(1 to 15)
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("capsaicin"))
holder.remove_reagent("capsaicin", 5)
if(isslime(M))
M.bodytemperature -= rand(5,20)
if(15 to 25)
M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT
if(isslime(M))
M.bodytemperature -= rand(10,20)
if(25 to 35)
M.bodytemperature -= 30 * TEMPERATURE_DAMAGE_COEFFICIENT
if(prob(1))
M.emote("shiver")
if(isslime(M))
M.bodytemperature -= rand(15,20)
if(35 to INFINITY)
M.bodytemperature -= 40 * TEMPERATURE_DAMAGE_COEFFICIENT
if(prob(5))
M.emote("shiver")
if(isslime(M))
M.bodytemperature -= rand(20,25)
M.bodytemperature = max(50, M.bodytemperature)
var/cooling = 0
switch(current_cycle)
if(1 to 15)
cooling = -10 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("capsaicin"))
holder.remove_reagent("capsaicin", 5)
if(isslime(M))
cooling = -rand(5,20)
if(15 to 25)
cooling = -20 * TEMPERATURE_DAMAGE_COEFFICIENT
if(isslime(M))
cooling = -rand(10,20)
if(25 to 35)
cooling = -30 * TEMPERATURE_DAMAGE_COEFFICIENT
if(prob(1))
M.emote("shiver")
if(isslime(M))
cooling = -rand(15,20)
if(35 to INFINITY)
cooling = -40 * TEMPERATURE_DAMAGE_COEFFICIENT
if(prob(5))
M.emote("shiver")
if(isslime(M))
cooling = -rand(20,25)
M.adjust_bodytemperature(cooling, 50)
..()
/datum/reagent/consumable/frostoil/reaction_turf(turf/T, reac_volume)
@@ -373,8 +375,7 @@
glass_desc = "Tasty."
/datum/reagent/consumable/hot_coco/on_mob_life(mob/living/M)
if (M.bodytemperature < BODYTEMP_NORMAL)//310.15 is the normal bodytemp.
M.bodytemperature = min(BODYTEMP_NORMAL, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
..()
/datum/reagent/mushroomhallucinogen
@@ -465,8 +466,7 @@
taste_description = "wet and cheap noodles"
/datum/reagent/consumable/hot_ramen/on_mob_life(mob/living/M)
if (M.bodytemperature < BODYTEMP_NORMAL)//310.15 is the normal bodytemp.
M.bodytemperature = min(BODYTEMP_NORMAL, M.bodytemperature + (10 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
..()
/datum/reagent/consumable/hell_ramen
@@ -478,7 +478,7 @@
taste_description = "wet and cheap noodles on fire"
/datum/reagent/consumable/hell_ramen/on_mob_life(mob/living/M)
M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT
M.adjust_bodytemperature(10 * TEMPERATURE_DAMAGE_COEFFICIENT)
..()
/datum/reagent/consumable/flour
@@ -22,9 +22,9 @@
/datum/reagent/medicine/leporazine/on_mob_life(mob/living/M)
if(M.bodytemperature > BODYTEMP_NORMAL)
M.bodytemperature = max(BODYTEMP_NORMAL, M.bodytemperature - (40 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(-40 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
else if(M.bodytemperature < (BODYTEMP_NORMAL + 1))
M.bodytemperature = min(BODYTEMP_NORMAL, M.bodytemperature + (40 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.adjust_bodytemperature(40 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
..()
/datum/reagent/medicine/adminordrazine //An OP chemical for admins
@@ -1272,4 +1272,4 @@
M.adjustStaminaLoss(1.5*REM, 0)
..()
. = 1
@@ -187,7 +187,7 @@
/datum/reagent/cryostylane/on_mob_life(mob/living/M) //TODO: code freezing into an ice cube
if(M.reagents.has_reagent("oxygen"))
M.reagents.remove_reagent("oxygen", 0.5)
M.bodytemperature = max(M.bodytemperature - 15,0)
M.adjust_bodytemperature(-15)
..()
/datum/reagent/cryostylane/reaction_turf(turf/T, reac_volume)
@@ -206,7 +206,7 @@
/datum/reagent/pyrosium/on_mob_life(mob/living/M)
if(M.reagents.has_reagent("oxygen"))
M.reagents.remove_reagent("oxygen", 0.5)
M.bodytemperature += 15
M.adjust_bodytemperature(15)
..()
/datum/reagent/teslium //Teslium. Causes periodic shocks, and makes shocks against the target much more effective.
@@ -207,7 +207,7 @@
user.playsound_local(get_turf(user), 'sound/effects/ghost2.ogg', 50, 1)
target.become_blind(ABYSSAL_GAZE_BLIND)
addtimer(CALLBACK(src, .proc/cure_blindness, target), 40)
target.bodytemperature -= 200
target.adjust_bodytemperature(-200)
/obj/effect/proc_holder/spell/targeted/abyssal_gaze/proc/cure_blindness(mob/target)
if(isliving(target))
+2 -2
View File
@@ -333,14 +333,14 @@
cooldown = COOLDOWN_DAMAGE
for(var/V in listeners)
var/mob/living/L = V
L.bodytemperature += (50 * power_multiplier)
L.adjust_bodytemperature(50 * power_multiplier)
//COLD
else if((findtext(message, cold_words)))
cooldown = COOLDOWN_DAMAGE
for(var/V in listeners)
var/mob/living/L = V
L.bodytemperature -= (50 * power_multiplier)
L.adjust_bodytemperature(-50 * power_multiplier)
//REPULSE
else if((findtext(message, repulse_words)))