TG update: ... -Removed setBruteLoss and setFireLoss since they served no purpose. -Overrided the proc for get[Fire/Brute]Loss and adjust[Fire/Brute]Loss for humans to use the total damage proc. -Removed redundant checks aka setBruteLoss(max(getBruteLoss(), 0) since the adjust brute proc already prevents it from going negative. -Commented out the UpdateDamage() procs contents as it did nothing. If problems arise we might have to investigate. Soon I will remove the proc entierly.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2673 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
rockdtben
2011-12-26 20:14:44 +02:00
committed by Albert Iordache
parent e76711f587
commit 382b6681fd
9 changed files with 39 additions and 37 deletions
-4
View File
@@ -40,10 +40,6 @@
paralysis = 0
weakened = 0
sleeping = 0
setBruteLoss(max(getBruteLoss(), 0))
setToxLoss(max(getToxLoss(), 0))
setOxyLoss(max(getOxyLoss(), 0))
setFireLoss(max(getFireLoss(), 0))
if(stat)
stat = 0
return
@@ -82,10 +82,6 @@
paralysis = max(min(paralysis, 20), 0)
weakened = max(min(weakened, 20), 0)
sleeping = max(min(sleeping, 20), 0)
setBruteLoss(max(getBruteLoss(), 0))
setToxLoss(max(getToxLoss(), 0))
setOxyLoss(max(getOxyLoss(), 0))
adjustFireLoss(0)
handle_mutations_and_radiation()
+25 -6
View File
@@ -2281,11 +2281,6 @@ It can still be worn/put on as normal.
src.health = 100
src.stat = 0
return
adjustBruteLoss(-getBruteLoss())
adjustFireLoss(-getFireLoss())
for(var/datum/organ/external/O in organs)
src.adjustBruteLoss(O.brute_dam)
src.adjustFireLoss(O.burn_dam)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss()
@@ -2296,4 +2291,28 @@ It can still be worn/put on as normal.
if((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )))
return 1
return 0
return 0
/mob/living/carbon/human/getBruteLoss()
var/amount = 0.0
for(var/datum/organ/external/O in organs)
amount+= O.brute_dam
return amount
/mob/living/carbon/human/adjustBruteLoss(var/amount)
if(amount > 0)
take_overall_damage(amount, 0)
else
heal_overall_damage(-amount, 0)
/mob/living/carbon/human/getFireLoss()
var/amount = 0.0
for(var/datum/organ/external/O in organs)
amount+= O.burn_dam
return amount
/mob/living/carbon/human/adjustFireLoss(var/amount)
if(amount > 0)
take_overall_damage(0, amount)
else
heal_overall_damage(0, -amount)
@@ -11,12 +11,13 @@
/mob/living/carbon/human/proc/UpdateDamage()
adjustBruteLoss(-getBruteLoss())
adjustFireLoss(-getFireLoss())
for(var/datum/organ/external/O in organs)
if(istype(O, /datum/organ/external))
adjustBruteLoss(O.brute_dam)
adjustFireLoss(O.burn_dam)
// Rockdtben - remove this soon.
// adjustBruteLoss(-getBruteLoss())
// adjustFireLoss(-getFireLoss())
// for(var/datum/organ/external/O in organs)
// if(istype(O, /datum/organ/external))
// adjustBruteLoss(O.brute_dam)
// adjustFireLoss(O.burn_dam)
return
// new damage icon system
@@ -27,7 +28,6 @@
body_standing = list()
del(body_lying)
body_lying = list()
UpdateDamage()
for(var/datum/organ/external/O in organs)
var/icon/DI = new /icon('dam_human.dmi', O.damage_state) // the damage icon for whole human
DI.Blend(new /icon('dam_mask.dmi', O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels