Merge pull request #4209 from Fox-McCloud/fixes-cold-heat

Fixes+Cleans Up Cold+Heat Resist Mutations
This commit is contained in:
TheDZD
2016-04-20 18:14:58 -04:00
9 changed files with 17 additions and 35 deletions
+2 -3
View File
@@ -182,9 +182,8 @@
if (istype(location, /turf/simulated))
location.add_blood_floor(M)
if("fire")
if (!(RESIST_COLD in M.mutations))
M.take_organ_damage(0, power)
to_chat(M, "Aargh it burns!")
M.take_organ_damage(0, power)
to_chat(M, "Aargh it burns!")
M.updatehealth()
add_fingerprint(user)
return 1
+1 -2
View File
@@ -334,8 +334,7 @@
var/turf/simulated/location = get_turf(M)
if(istype(location)) location.add_blood_floor(M)
if("fire")
if (!(RESIST_COLD in M.mutations))
M.take_organ_damage(0, force)
M.take_organ_damage(0, force)
M.updatehealth()
if(seed && seed.get_trait(TRAIT_CARNIVOROUS))
+12 -5
View File
@@ -448,9 +448,12 @@
if(status_flags & GODMODE) return 1 //godmode
if(adjusted_pressure >= species.hazard_high_pressure)
var/pressure_damage = min( ( (adjusted_pressure / species.hazard_high_pressure) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE)
take_overall_damage(brute=pressure_damage, used_weapon = "High Pressure")
throw_alert("pressure", /obj/screen/alert/highpressure, 2)
if(!(RESIST_HEAT in mutations))
var/pressure_damage = min( ( (adjusted_pressure / species.hazard_high_pressure) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE)
take_overall_damage(brute=pressure_damage, used_weapon = "High Pressure")
throw_alert("pressure", /obj/screen/alert/highpressure, 2)
else
clear_alert("pressure")
else if(adjusted_pressure >= species.warning_high_pressure)
throw_alert("pressure", /obj/screen/alert/highpressure, 1)
else if(adjusted_pressure >= species.warning_low_pressure)
@@ -469,6 +472,8 @@
/mob/living/carbon/human/handle_fire()
if(..())
return
if(RESIST_HEAT in mutations)
return
var/thermal_protection = 0 //Simple check to estimate how protected we are against multiple temperatures
if(wear_suit)
if(wear_suit.max_heat_protection_temperature >= FIRE_SUIT_MAX_TEMP_PROTECT)
@@ -547,11 +552,13 @@
return thermal_protection_flags
/mob/living/carbon/human/proc/get_heat_protection(temperature) //Temperature is the temperature you're being exposed to.
if(RESIST_HEAT in mutations)
return 1
var/thermal_protection_flags = get_heat_protection_flags(temperature)
var/thermal_protection = 0.0
if(RESIST_HEAT in mutations)
return 1
if(thermal_protection_flags)
if(thermal_protection_flags & HEAD)
thermal_protection += THERMAL_PROTECTION_HEAD
@@ -186,7 +186,7 @@
H.emote(pick("giggle", "laugh"))
SA.moles = 0
if( (abs(310.15 - breath.temperature) > 50) && !(RESIST_HEAT in H.mutations)) // Hot air hurts :(
if(abs(310.15 - breath.temperature) > 50) // Hot air hurts :(
if(H.status_flags & GODMODE)
return 1 //godmode
if(breath.temperature < cold_level_1)
@@ -333,7 +333,7 @@
return 1
/datum/species/proc/handle_temperature(datum/gas_mixture/breath, var/mob/living/carbon/human/H) // called by human/life, handles temperatures
if( (abs(310.15 - breath.temperature) > 50) && !(RESIST_HEAT in H.mutations)) // Hot air hurts :(
if(abs(310.15 - breath.temperature) > 50) // Hot air hurts :(
if(H.status_flags & GODMODE) return 1 //godmode
if(breath.temperature < cold_level_1)
if(prob(20))
@@ -506,23 +506,6 @@ var/global/list/damage_icon_parts = list()
add_image = 1
for(var/mut in mutations)
switch(mut)
/*
if(HULK)
if(fat)
standing.underlays += "hulk_[fat]_s"
else
standing.underlays += "hulk_[g]_s"
add_image = 1
if(RESIST_COLD)
standing.underlays += "fire[fat]_s"
add_image = 1
if(RESIST_HEAT)
standing.underlays += "cold[fat]_s"
add_image = 1
if(TK)
standing.underlays += "telekinesishead[fat]_s"
add_image = 1
*/
if(LASER)
standing.overlays += "lasereyes_s"
add_image = 1
-1
View File
@@ -15,7 +15,6 @@
if(BRUTE)
adjustBruteLoss(damage * blocked)
if(BURN)
if(RESIST_HEAT in mutations) damage = 0
adjustFireLoss(damage * blocked)
if(TOX)
adjustToxLoss(damage * blocked)
-3
View File
@@ -92,9 +92,6 @@
//sort of a legacy burn method for /electrocute, /shock, and the e_chair
/mob/living/proc/burn_skin(burn_amount)
if(istype(src, /mob/living/carbon/human))
// to_chat(world, "DEBUG: burn_skin(), mutations=[mutations]")
if (RESIST_HEAT in src.mutations) //fireproof
return 0
var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part
var/divided_damage = (burn_amount)/(H.organs.len)
var/extradam = 0 //added to when organ is at max dam
-2
View File
@@ -337,7 +337,6 @@
continue
M.show_message("[user.name] smashed the light!", 3, "You hear a tinkle of breaking glass", 2)
if(on && (W.flags & CONDUCT))
//if(!user.mutations & RESIST_COLD)
if (prob(12))
electrocute_mob(user, get_area(src), src, 0.3)
broken()
@@ -374,7 +373,6 @@
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
//if(!user.mutations & RESIST_COLD)
if (prob(75))
electrocute_mob(user, get_area(src), src, rand(0.7,1.0))