From 7c2224b88039f7e2f3e70225309aff8764cafc19 Mon Sep 17 00:00:00 2001 From: Markolie Date: Fri, 27 Feb 2015 21:11:36 +0100 Subject: [PATCH] Temperature fixes --- code/modules/mob/living/carbon/carbon.dm | 4 --- code/modules/mob/living/carbon/human/life.dm | 38 ++++++++++---------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index b8c50d3a362..90ff4d4841f 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -449,10 +449,6 @@ item.throw_at(target, item.throw_range, item.throw_speed, src) -/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - ..() - bodytemperature = max(bodytemperature, BODYTEMP_HEAT_DAMAGE_LIMIT+10) - /mob/living/carbon/can_use_hands() if(handcuffed) return 0 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 95dee276004..b821d8881e4 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -576,32 +576,30 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc //Body temperature is too hot. fire_alert = max(fire_alert, 1) if(status_flags & GODMODE) return 1 //godmode - switch(bodytemperature) - if(species.heat_level_1 to species.heat_level_2) - take_overall_damage(burn=HEAT_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 2) - if(species.heat_level_2 to species.heat_level_3) - take_overall_damage(burn=HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 2) - if(species.heat_level_3 to INFINITY) - take_overall_damage(burn=HEAT_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 2) + if(bodytemperature >= species.heat_level_1 && bodytemperature <= species.heat_level_2) + take_overall_damage(burn=HEAT_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 2) + if(bodytemperature > species.heat_level_2 && bodytemperature <= species.heat_level_3) + take_overall_damage(burn=HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 2) + if(bodytemperature > species.heat_level_3 && bodytemperature < INFINITY) + take_overall_damage(burn=HEAT_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 2) else if(bodytemperature < species.cold_level_1) fire_alert = max(fire_alert, 1) if(status_flags & GODMODE) return 1 //godmode if(stat == DEAD) return 1 //ZomgPonies -- No need for cold burn damage if dead if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) - switch(bodytemperature) - if(species.cold_level_2 to species.cold_level_1) - take_overall_damage(burn=COLD_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 1) - if(species.cold_level_3 to species.cold_level_2) - take_overall_damage(burn=COLD_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 1) - if(-INFINITY to species.cold_level_3) - take_overall_damage(burn=COLD_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature") - fire_alert = max(fire_alert, 1) + if(bodytemperature >= species.cold_level_2 && bodytemperature <= species.cold_level_1) + take_overall_damage(burn=COLD_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 1) + if(bodytemperature >= species.cold_level_3 && bodytemperature < species.cold_level_2) + take_overall_damage(burn=COLD_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 1) + if(bodytemperature > -INFINITY && bodytemperature < species.cold_level_3) + take_overall_damage(burn=COLD_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature") + fire_alert = max(fire_alert, 1) // Account for massive pressure differences. Done by Polymorph // Made it possible to actually have something that can protect against high pressure... Done by Errorage. Polymorph now has an axe sticking from his head for his previous hardcoded nonsense!