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
-7
View File
@@ -446,9 +446,6 @@ the mob is also allowed to move without any sort of restriction. For instance, i
/mob/proc/adjustBruteLoss(var/amount)
bruteloss = max(bruteloss + amount, 0)
/mob/proc/setBruteLoss(var/amount)
bruteloss = amount
/mob/proc/getOxyLoss()
return oxyloss
@@ -473,10 +470,6 @@ the mob is also allowed to move without any sort of restriction. For instance, i
/mob/proc/adjustFireLoss(var/amount)
fireloss = max(fireloss + amount, 0)
/mob/proc/setFireLoss(var/amount)
fireloss = amount
/mob/proc/getCloneLoss()
return cloneloss
@@ -241,9 +241,9 @@
O.name = text("monkey ([])",copytext(md5(usr.real_name), 2, 6))
O.setToxLoss(usr.getToxLoss())
O.setBruteLoss(usr.getBruteLoss())
O.adjustBruteLoss(usr.getBruteLoss())
O.setOxyLoss(usr.getOxyLoss())
O.setFireLoss(usr.getFireLoss())
O.adjustFireLoss(usr.getFireLoss())
O.stat = usr.stat
O.a_intent = "hurt"
for (var/obj/item/weapon/implant/I in implants)
@@ -336,9 +336,9 @@
updateappearance(O,O.dna.uni_identity)
domutcheck(O, null)
O.setToxLoss(usr.getToxLoss())
O.setBruteLoss(usr.getBruteLoss())
O.adjustBruteLoss(usr.getBruteLoss())
O.setOxyLoss(usr.getOxyLoss())
O.setFireLoss(usr.getFireLoss())
O.adjustFireLoss(usr.getFireLoss())
O.stat = usr.stat
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
+1 -1
View File
@@ -168,7 +168,7 @@
if(confirm == "Yes")
suiciding = 1
setOxyLoss(100)
setBruteLoss(100)
adjustBruteLoss(100 - getBruteLoss())
setToxLoss(100)
setCloneLoss(100)
-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
+2 -2
View File
@@ -469,9 +469,9 @@ Doing this because FindTurfs() isn't even used
/mob/verb/Revive()
set category = "Debug"
if(Debug)
setFireLoss(0)
adjustFireLoss(0 - getBruteLoss())
setToxLoss(0)
setBruteLoss(0)
adjustBruteLoss(0 - getBruteLoss())
setOxyLoss(0)
paralysis = 0
stunned = 0
-2
View File
@@ -32,10 +32,8 @@
paralysis = max(min(paralysis, 1), 0)
weakened = max(min(weakened, 15), 0)
sleeping = max(min(sleeping, 1), 0)
setBruteLoss(max(getBruteLoss(), 0))
setToxLoss(0)
setOxyLoss(0)
adjustFireLoss(0)
use_power()