diff --git a/code/defines/mob/mob.dm b/code/defines/mob/mob.dm index a3a4d669c21..c73b44236ab 100644 --- a/code/defines/mob/mob.dm +++ b/code/defines/mob/mob.dm @@ -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 diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index c11b55facc3..a52099481e0 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -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 diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 4ec0d6dd35a..9de662a62d6 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -168,7 +168,7 @@ if(confirm == "Yes") suiciding = 1 setOxyLoss(100) - setBruteLoss(100) + adjustBruteLoss(100 - getBruteLoss()) setToxLoss(100) setCloneLoss(100) diff --git a/code/modules/mob/living/blob/blob.dm b/code/modules/mob/living/blob/blob.dm index 0c57cf269f2..fa0b312c246 100644 --- a/code/modules/mob/living/blob/blob.dm +++ b/code/modules/mob/living/blob/blob.dm @@ -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 diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 47e23e6f42a..9272023a879 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -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() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 4d41e1f7518..1f065ea48fa 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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 \ No newline at end of file + 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) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 5c7448948be..8bce9ab45aa 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -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 diff --git a/code/unused/_debug.dm b/code/unused/_debug.dm index bc4f8f24d64..2bd5370feb1 100644 --- a/code/unused/_debug.dm +++ b/code/unused/_debug.dm @@ -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 diff --git a/code/unused/hivebot/life.dm b/code/unused/hivebot/life.dm index a5513f759a0..b87152cf328 100644 --- a/code/unused/hivebot/life.dm +++ b/code/unused/hivebot/life.dm @@ -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()