From 90cb90e4945eb31002828c1e90147a51d7fabaf7 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Fri, 16 Mar 2018 00:19:12 -0400 Subject: [PATCH] POLARIS: Heal robolimbs when you heal everything Typically only used in magic and stuff, makes sense to heal both (otherwise there's no way to heal whole FBP bodies) --- .../mob/living/carbon/human/human_damage.dm | 15 +++++++++------ code/modules/mob/living/living.dm | 6 ++++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index f5ffaeab97..58a5b79419 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -108,7 +108,8 @@ amount += O.burn_dam return amount -/mob/living/carbon/human/adjustBruteLoss(var/amount) +//'include_robo' only applies to healing, for legacy purposes, as all damage typically hurts both types of organs +/mob/living/carbon/human/adjustBruteLoss(var/amount,var/include_robo) amount = amount*species.brute_mod if(amount > 0) for(var/datum/modifier/M in modifiers) @@ -122,10 +123,11 @@ for(var/datum/modifier/M in modifiers) if(!isnull(M.incoming_healing_percent)) amount *= M.incoming_healing_percent - heal_overall_damage(-amount, 0) + heal_overall_damage(-amount, 0, include_robo) BITSET(hud_updateflag, HEALTH_HUD) -/mob/living/carbon/human/adjustFireLoss(var/amount) +//'include_robo' only applies to healing, for legacy purposes, as all damage typically hurts both types of organs +/mob/living/carbon/human/adjustFireLoss(var/amount,var/include_robo) amount = amount*species.burn_mod if(amount > 0) for(var/datum/modifier/M in modifiers) @@ -139,7 +141,7 @@ for(var/datum/modifier/M in modifiers) if(!isnull(M.incoming_healing_percent)) amount *= M.incoming_healing_percent - heal_overall_damage(0, -amount) + heal_overall_damage(0, -amount, include_robo) BITSET(hud_updateflag, HEALTH_HUD) /mob/living/carbon/human/proc/adjustBruteLossByPart(var/amount, var/organ_name, var/obj/damage_source = null) @@ -352,7 +354,8 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t //Heal MANY external organs, in random order -/mob/living/carbon/human/heal_overall_damage(var/brute, var/burn) +//'include_robo' only applies to healing, for legacy purposes, as all damage typically hurts both types of organs +/mob/living/carbon/human/heal_overall_damage(var/brute, var/burn, var/include_robo) var/list/obj/item/organ/external/parts = get_damaged_organs(brute,burn) var/update = 0 @@ -362,7 +365,7 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t var/brute_was = picked.brute_dam var/burn_was = picked.burn_dam - update |= picked.heal_damage(brute,burn) + update |= picked.heal_damage(brute,burn,robo_repair = include_robo) brute -= (brute_was-picked.brute_dam) burn -= (burn_was-picked.burn_dam) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a5c363ed54..530c1d8828 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -282,7 +282,8 @@ default behaviour is: /mob/living/proc/getActualBruteLoss() // Mostly for humans with robolimbs. return getBruteLoss() -/mob/living/proc/adjustBruteLoss(var/amount) +//'include_robo' only applies to healing, for legacy purposes, as all damage typically hurts both types of organs +/mob/living/proc/adjustBruteLoss(var/amount,var/include_robo) if(status_flags & GODMODE) return 0 //godmode if(amount > 0) @@ -356,7 +357,8 @@ default behaviour is: /mob/living/proc/getActualFireLoss() // Mostly for humans with robolimbs. return getFireLoss() -/mob/living/proc/adjustFireLoss(var/amount) +//'include_robo' only applies to healing, for legacy purposes, as all damage typically hurts both types of organs +/mob/living/proc/adjustFireLoss(var/amount,var/include_robo) if(status_flags & GODMODE) return 0 //godmode if(amount > 0) for(var/datum/modifier/M in modifiers)