From 8ee9a5c00e2489e14c46cb01dcfc98601611d94b Mon Sep 17 00:00:00 2001 From: carnie Date: Thu, 23 May 2013 17:15:26 +0100 Subject: [PATCH] *Fixes #619 - halloss can no longer stop death() *halloss removed from all updatehealth() procs. I could see no reason for it to be there. Correct me if I'm wrong. *Updated all updatehealth() procs to use maxHealth instead of magic numbers. --- code/modules/mob/living/carbon/alien/alien.dm | 7 +++---- code/modules/mob/living/carbon/human/death.dm | 3 --- .../mob/living/carbon/human/human_damage.dm | 6 +++--- .../modules/mob/living/carbon/metroid/metroid.dm | 16 ---------------- code/modules/mob/living/living.dm | 6 +++--- code/modules/mob/living/silicon/ai/life.dm | 11 +++++------ code/modules/mob/living/silicon/decoy/life.dm | 6 +++--- code/modules/mob/living/silicon/pai/life.dm | 6 +++--- 8 files changed, 20 insertions(+), 41 deletions(-) diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index c01f0f5174b..8360a238d90 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -58,10 +58,9 @@ if(status_flags & GODMODE) health = maxHealth stat = CONSCIOUS - else - //oxyloss is only used for suicide - //toxloss isn't used for aliens, its actually used as alien powers!! - health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() + return + //oxyloss is only used for suicide + health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() /mob/living/carbon/alien/proc/handle_environment(var/datum/gas_mixture/environment) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 8988ef4e4fc..ffc00aed53d 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -40,9 +40,6 @@ /mob/living/carbon/human/death(gibbed) - if(halloss > 0 && !gibbed) - halloss = 0 - return if(stat == DEAD) return if(healths) healths.icon_state = "health5" stat = DEAD diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 86ad74c85e2..1ad89612dd2 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -1,7 +1,7 @@ //Updates the mob's health from organs and mob damage variables /mob/living/carbon/human/updatehealth() if(status_flags & GODMODE) - health = 100 + health = maxHealth stat = CONSCIOUS return var/total_burn = 0 @@ -9,9 +9,9 @@ for(var/datum/limb/O in organs) //hardcoded to streamline things a bit total_brute += O.brute_dam total_burn += O.burn_dam - health = 100 - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute + health = maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute //TODO: fix husking - if( ((100 - total_burn) < config.health_threshold_dead) && stat == DEAD) //100 only being used as the magic human max health number, feel free to change it if you add a var for it -- Urist + if( ((maxHealth - total_burn) < config.health_threshold_dead) && stat == DEAD ) ChangeToHusk() return diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 62485667501..707692685ed 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -592,22 +592,6 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 /mob/living/carbon/slime/show_inv(mob/user) return - -/mob/living/carbon/slime/updatehealth() - if(status_flags & GODMODE) - if(istype(src, /mob/living/carbon/slime/adult)) - health = 200 - else - health = 150 - stat = CONSCIOUS - else - // slimes can't suffocate unless they suicide. They are also not harmed by fire - if(istype(src, /mob/living/carbon/slime/adult)) - health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()) - else - health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()) - - /mob/living/carbon/slime/proc/get_obstacle_ok(atom/A) var/direct = get_dir(src, A) var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( src.loc ) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 7812fd2bc13..c607b5b203f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -17,10 +17,10 @@ /mob/living/proc/updatehealth() if(status_flags & GODMODE) - health = 100 + health = maxHealth stat = CONSCIOUS - else - health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() - halloss + return + health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() //This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index fc5edc2f2a3..028a233013c 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -163,10 +163,9 @@ /mob/living/silicon/ai/updatehealth() if(status_flags & GODMODE) - health = 100 + health = maxHealth stat = CONSCIOUS - else - if(fire_res_on_core) - health = 100 - getOxyLoss() - getToxLoss() - getBruteLoss() - else - health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() \ No newline at end of file + return + health = maxHealth - getOxyLoss() - getToxLoss() - getBruteLoss() + if(!fire_res_on_core) + health -= getFireLoss() \ No newline at end of file diff --git a/code/modules/mob/living/silicon/decoy/life.dm b/code/modules/mob/living/silicon/decoy/life.dm index d62d5d15dae..8a336b8353b 100644 --- a/code/modules/mob/living/silicon/decoy/life.dm +++ b/code/modules/mob/living/silicon/decoy/life.dm @@ -9,7 +9,7 @@ /mob/living/silicon/decoy/updatehealth() if(status_flags & GODMODE) - health = 100 + health = maxHealth stat = CONSCIOUS - else - health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() + return + health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm index 61bbd2c33d7..da97f539da1 100644 --- a/code/modules/mob/living/silicon/pai/life.dm +++ b/code/modules/mob/living/silicon/pai/life.dm @@ -20,10 +20,10 @@ /mob/living/silicon/pai/updatehealth() if(status_flags & GODMODE) - health = 100 + health = maxHealth stat = CONSCIOUS - else - health = 100 - getBruteLoss() - getFireLoss() + return + health = maxHealth - getBruteLoss() - getFireLoss() /mob/living/silicon/pai/proc/follow_pai() while(card)