diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index b115ffe94c..970fc062c0 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -11,9 +11,9 @@ total_brute += O.brute_dam total_burn += O.burn_dam - var/oxy_l = (species.flags & NO_BREATHE ? 0 : getOxyLoss()) - var/tox_l = (species.flags & NO_POISON ? 0 : getToxLoss()) - var/clone_l = getCloneLoss() //TODO: link this to NO_SCAN + var/oxy_l = ((species.flags & NO_BREATHE) ? 0 : getOxyLoss()) + var/tox_l = ((species.flags & NO_POISON) ? 0 : getToxLoss()) + var/clone_l = getCloneLoss() health = species.total_health - oxy_l - tox_l - clone_l - total_burn - total_brute @@ -138,10 +138,22 @@ if(HULK in mutations) return ..() +/mob/living/carbon/human/getCloneLoss() + if(species.flags & (IS_SYNTHETIC | NO_SCAN)) + cloneloss = 0 + ..() + +/mob/living/carbon/human/setCloneLoss(var/amount) + if(species.flags & (IS_SYNTHETIC | NO_SCAN)) + cloneloss = 0 + else + ..() + /mob/living/carbon/human/adjustCloneLoss(var/amount) ..() - if(species.flags & IS_SYNTHETIC) + if(species.flags & (IS_SYNTHETIC | NO_SCAN)) + cloneloss = 0 return var/heal_prob = max(0, 80 - getCloneLoss()) @@ -172,6 +184,41 @@ src << "Your [O.display_name] is shaped normally again." hud_updateflag |= 1 << HEALTH_HUD +// Defined here solely to take species flags into account without having to recast at mob/living level. +/mob/living/carbon/human/getOxyLoss() + if(species.flags & NO_BREATHE) + oxyloss = 0 + ..() + +/mob/living/carbon/human/adjustOxyLoss(var/amount) + if(species.flags & NO_BREATHE) + oxyloss = 0 + else + ..() + +/mob/living/carbon/human/setOxyLoss(var/amount) + if(species.flags & NO_BREATHE) + oxyloss = 0 + else + ..() + +/mob/living/carbon/human/getToxLoss() + if(species.flags & NO_POISON) + toxloss = 0 + ..() + +/mob/living/carbon/human/adjustToxLoss(var/amount) + if(species.flags & NO_POISON) + toxloss = 0 + else + ..() + +/mob/living/carbon/human/setToxLoss(var/amount) + if(species.flags & NO_POISON) + toxloss = 0 + else + ..() + //////////////////////////////////////////// //Returns a list of damaged organs