Fix species radiation multipliers (#1325)

Fixes radiation so species' radiation_mod values are actually applied.
Refactored radiation application to use proc apply_radiation() instead of directly modifying the variable.
This commit is contained in:
Lohikar
2016-12-28 01:15:20 +02:00
committed by skull132
parent fbe0ea9c25
commit 982bf9b1a1
19 changed files with 56 additions and 41 deletions
+7 -1
View File
@@ -54,7 +54,7 @@
adjustHalLoss(effect) //Changed this to use the wrapper function, it shouldn't directly alter the value
if(IRRADIATE)
var/rad_protection = check_protection ? getarmor(null, "rad")/100 : 0
radiation += max((1-rad_protection)*effect/(blocked+1),0)//Rads auto check armor
apply_radiation(max((1-rad_protection)*effect/(blocked+1),0))//Rads auto check armor
if(STUTTER)
if(status_flags & CANSTUN) // stun is usually associated with stutter
stuttering = max(stuttering,(effect/(blocked+1)))
@@ -81,3 +81,9 @@
if(agony) apply_effect(agony, AGONY, blocked)
if(incinerate) apply_effect(incinerate, INCINERATE, blocked)
return 1
// overridden by human
/mob/living/proc/apply_radiation(var/rads)
total_radiation += rads
if (total_radiation < 0)
total_radiation = 0