diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm
index e449e6e14e66..aff7eaa28410 100644
--- a/code/datums/diseases/advance/symptoms/heal.dm
+++ b/code/datums/diseases/advance/symptoms/heal.dm
@@ -81,13 +81,13 @@
M.adjustToxLoss(-(4 * heal_amt)) //most effective on toxins
- var/list/parts = M.get_damaged_bodyparts(1,1)
+ var/list/parts = M.get_damaged_bodyparts(1,1, null, BODYPART_ORGANIC)
if(!parts.len)
return
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len))
+ if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len, null, BODYPART_ORGANIC))
M.update_damage_overlays()
return 1
@@ -191,7 +191,7 @@
/datum/symptom/heal/darkness/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
var/heal_amt = 2 * actual_power
- var/list/parts = M.get_damaged_bodyparts(1,1)
+ var/list/parts = M.get_damaged_bodyparts(1,1, null, BODYPART_ORGANIC)
if(!parts.len)
return
@@ -200,7 +200,7 @@
to_chat(M, "The darkness soothes and mends your wounds.")
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len * 0.5)) //more effective on brute
+ if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len * 0.5, null, BODYPART_ORGANIC)) //more effective on brute
M.update_damage_overlays()
return 1
@@ -271,7 +271,7 @@
return
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len))
+ if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len, null, BODYPART_ORGANIC))
M.update_damage_overlays()
if(active_coma && M.getBruteLoss() + M.getFireLoss() == 0)
@@ -321,7 +321,7 @@
/datum/symptom/heal/water/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
var/heal_amt = 2 * actual_power
- var/list/parts = M.get_damaged_bodyparts(1,1) //more effective on burns
+ var/list/parts = M.get_damaged_bodyparts(1,1, null, BODYPART_ORGANIC) //more effective on burns
if(!parts.len)
return
@@ -330,7 +330,7 @@
to_chat(M, "You feel yourself absorbing the water around you to soothe your damaged skin.")
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(heal_amt/parts.len * 0.5, heal_amt/parts.len))
+ if(L.heal_damage(heal_amt/parts.len * 0.5, heal_amt/parts.len, null, BODYPART_ORGANIC))
M.update_damage_overlays()
return 1
@@ -394,13 +394,13 @@
M.adjustToxLoss(-heal_amt)
- var/list/parts = M.get_damaged_bodyparts(1,1)
+ var/list/parts = M.get_damaged_bodyparts(1,1, null, BODYPART_ORGANIC)
if(!parts.len)
return
if(prob(5))
to_chat(M, "The pain from your wounds fades rapidly.")
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len))
+ if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len, null, BODYPART_ORGANIC))
M.update_damage_overlays()
return 1
@@ -452,7 +452,7 @@
M.adjustToxLoss(-(2 * heal_amt))
- var/list/parts = M.get_damaged_bodyparts(1,1)
+ var/list/parts = M.get_damaged_bodyparts(1,1, null, BODYPART_ORGANIC)
if(!parts.len)
return
@@ -461,6 +461,6 @@
to_chat(M, "Your skin glows faintly, and you feel your wounds mending themselves.")
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len))
+ if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len, null, BODYPART_ORGANIC))
M.update_damage_overlays()
return 1
diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm
index 3e1ae71f291a..88d5d8b98fd6 100644
--- a/code/game/objects/items/storage/book.dm
+++ b/code/game/objects/items/storage/book.dm
@@ -92,12 +92,12 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", "
return 0
var/heal_amt = 10
- var/list/hurt_limbs = H.get_damaged_bodyparts(1, 1)
+ var/list/hurt_limbs = H.get_damaged_bodyparts(1, 1, null, BODYPART_ORGANIC)
if(hurt_limbs.len)
for(var/X in hurt_limbs)
var/obj/item/bodypart/affecting = X
- if(affecting.heal_damage(heal_amt, heal_amt))
+ if(affecting.heal_damage(heal_amt, heal_amt, null, BODYPART_ORGANIC))
H.update_damage_overlays()
H.visible_message("[user] heals [H] with the power of [deity_name]!")
to_chat(H, "May the power of [deity_name] compel you to be healed!")
diff --git a/code/modules/antagonists/changeling/powers/strained_muscles.dm b/code/modules/antagonists/changeling/powers/strained_muscles.dm
index 2624b6396acc..c1a90ee8aa2a 100644
--- a/code/modules/antagonists/changeling/powers/strained_muscles.dm
+++ b/code/modules/antagonists/changeling/powers/strained_muscles.dm
@@ -38,7 +38,7 @@
break
stacks++
- //user.take_bodypart_damage(stacks * 0.03, 0)
+
user.staminaloss += stacks * 1.3 //At first the changeling may regenerate stamina fast enough to nullify fatigue, but it will stack
if(stacks == 11) //Warning message that the stacks are getting too high
diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm
index df92b36c650d..0ad79b4189f4 100644
--- a/code/modules/mob/living/carbon/damage_procs.dm
+++ b/code/modules/mob/living/carbon/damage_procs.dm
@@ -61,22 +61,22 @@
return amount
-/mob/living/carbon/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/carbon/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
if(!forced && (status_flags & GODMODE))
return FALSE
if(amount > 0)
- take_overall_damage(amount, 0, 0, updating_health)
+ take_overall_damage(amount, 0, 0, updating_health, required_status)
else
- heal_overall_damage(abs(amount), 0, 0, FALSE, TRUE, updating_health)
+ heal_overall_damage(abs(amount), 0, 0, required_status ? required_status : BODYPART_ORGANIC, updating_health)
return amount
-/mob/living/carbon/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/carbon/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
if(!forced && (status_flags & GODMODE))
return FALSE
if(amount > 0)
- take_overall_damage(0, amount, 0, updating_health)
+ take_overall_damage(0, amount, 0, updating_health, required_status)
else
- heal_overall_damage(0, abs(amount), 0, FALSE, TRUE, updating_health)
+ heal_overall_damage(0, abs(amount), 0, required_status ? required_status : BODYPART_ORGANIC, updating_health)
return amount
/mob/living/carbon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
@@ -100,7 +100,7 @@
if(amount > 0)
take_overall_damage(0, 0, amount, updating_health)
else
- heal_overall_damage(0, 0, abs(amount), FALSE, FALSE, updating_health)
+ heal_overall_damage(0, 0, abs(amount), null, updating_health)
return amount
/mob/living/carbon/setStaminaLoss(amount, updating = TRUE, forced = FALSE)
@@ -117,17 +117,19 @@
var/list/obj/item/bodypart/parts = list()
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
- if(status && BP.status != status)
+ if(status && (BP.status != status))
continue
if((brute && BP.brute_dam) || (burn && BP.burn_dam) || (stamina && BP.stamina_dam))
parts += BP
return parts
//Returns a list of damageable bodyparts
-/mob/living/carbon/proc/get_damageable_bodyparts()
+/mob/living/carbon/proc/get_damageable_bodyparts(status)
var/list/obj/item/bodypart/parts = list()
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
+ if(status && (BP.status != status))
+ continue
if(BP.brute_dam + BP.burn_dam < BP.max_damage)
parts += BP
return parts
@@ -135,19 +137,19 @@
//Heals ONE bodypart randomly selected from damaged ones.
//It automatically updates damage overlays if necessary
//It automatically updates health status
-/mob/living/carbon/heal_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, only_robotic = FALSE, only_organic = TRUE)
- var/list/obj/item/bodypart/parts = get_damaged_bodyparts(brute,burn)
+/mob/living/carbon/heal_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, required_status)
+ var/list/obj/item/bodypart/parts = get_damaged_bodyparts(brute,burn,stamina,required_status)
if(!parts.len)
return
var/obj/item/bodypart/picked = pick(parts)
- if(picked.heal_damage(brute, burn, stamina, only_robotic, only_organic))
+ if(picked.heal_damage(brute, burn, stamina, required_status))
update_damage_overlays()
//Damages ONE bodypart randomly selected from damagable ones.
//It automatically updates damage overlays if necessary
//It automatically updates health status
-/mob/living/carbon/take_bodypart_damage(brute = 0, burn = 0, stamina = 0)
- var/list/obj/item/bodypart/parts = get_damageable_bodyparts()
+/mob/living/carbon/take_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, required_status)
+ var/list/obj/item/bodypart/parts = get_damageable_bodyparts(required_status)
if(!parts.len)
return
var/obj/item/bodypart/picked = pick(parts)
@@ -155,8 +157,8 @@
update_damage_overlays()
//Heal MANY bodyparts, in random order
-/mob/living/carbon/heal_overall_damage(brute = 0, burn = 0, stamina = 0, only_robotic = FALSE, only_organic = TRUE, updating_health = TRUE)
- var/list/obj/item/bodypart/parts = get_damaged_bodyparts(brute, burn, stamina)
+/mob/living/carbon/heal_overall_damage(brute = 0, burn = 0, stamina = 0, required_status, updating_health = TRUE)
+ var/list/obj/item/bodypart/parts = get_damaged_bodyparts(brute, burn, stamina, required_status)
var/update = NONE
while(parts.len && (brute > 0 || burn > 0 || stamina > 0))
@@ -166,7 +168,7 @@
var/burn_was = picked.burn_dam
var/stamina_was = picked.stamina_dam
- update |= picked.heal_damage(brute, burn, stamina, only_robotic, only_organic, FALSE)
+ update |= picked.heal_damage(brute, burn, stamina, required_status, FALSE)
brute = round(brute - (brute_was - picked.brute_dam), DAMAGE_PRECISION)
burn = round(burn - (burn_was - picked.burn_dam), DAMAGE_PRECISION)
@@ -180,11 +182,11 @@
update_damage_overlays()
// damage MANY bodyparts, in random order
-/mob/living/carbon/take_overall_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, required_status = null)
+/mob/living/carbon/take_overall_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, required_status)
if(status_flags & GODMODE)
return //godmode
- var/list/obj/item/bodypart/parts = get_damageable_bodyparts()
+ var/list/obj/item/bodypart/parts = get_damageable_bodyparts(required_status)
var/update = 0
while(parts.len && (brute > 0 || burn > 0 || stamina > 0))
var/obj/item/bodypart/picked = pick(parts)
diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm
index 8224e7ce6747..5a4761403a69 100644
--- a/code/modules/mob/living/carbon/human/species_types/golems.dm
+++ b/code/modules/mob/living/carbon/human/species_types/golems.dm
@@ -254,7 +254,7 @@
/datum/species/golem/alloy/spec_life(mob/living/carbon/human/H)
if(H.stat == DEAD)
return
- H.heal_overall_damage(2,2)
+ H.heal_overall_damage(2,2, 0, BODYPART_ORGANIC)
H.adjustToxLoss(-2)
H.adjustOxyLoss(-2)
@@ -296,7 +296,7 @@
if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL)
H.set_nutrition(NUTRITION_LEVEL_ALMOST_FULL)
if(light_amount > 0.2) //if there's enough light, heal
- H.heal_overall_damage(1,1)
+ H.heal_overall_damage(1,1,0, BODYPART_ORGANIC)
H.adjustToxLoss(-1)
H.adjustOxyLoss(-1)
diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
index 760813679779..3c8ac208e67c 100644
--- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
@@ -35,7 +35,7 @@
if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL)
H.set_nutrition(NUTRITION_LEVEL_ALMOST_FULL)
if(light_amount > 0.2) //if there's enough light, heal
- H.heal_overall_damage(1,1)
+ H.heal_overall_damage(1,1, 0, BODYPART_ORGANIC)
H.adjustToxLoss(-1)
H.adjustOxyLoss(-1)
diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
index 333c4aaea362..c37c4a946cbe 100644
--- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
@@ -22,9 +22,9 @@
var/light_amount = T.get_lumcount()
if(light_amount > SHADOW_SPECIES_LIGHT_THRESHOLD) //if there's enough light, start dying
- H.take_overall_damage(1,1)
+ H.take_overall_damage(1,1, 0, BODYPART_ORGANIC)
else if (light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) //heal in the dark
- H.heal_overall_damage(1,1)
+ H.heal_overall_damage(1,1, 0, BODYPART_ORGANIC)
/datum/species/shadow/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm
index e7b43f48e495..ec2ed577af0d 100644
--- a/code/modules/mob/living/carbon/human/species_types/vampire.dm
+++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm
@@ -40,7 +40,7 @@
/datum/species/vampire/spec_life(mob/living/carbon/human/C)
. = ..()
if(istype(C.loc, /obj/structure/closet/crate/coffin))
- C.heal_overall_damage(4,4)
+ C.heal_overall_damage(4,4,0, BODYPART_ORGANIC)
C.adjustToxLoss(-4)
C.adjustOxyLoss(-4)
C.adjustCloneLoss(-4)
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index 6480d3f3143f..e51f8c049c61 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -154,7 +154,7 @@
/mob/living/proc/getBruteLoss()
return bruteloss
-/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
if(!forced && (status_flags & GODMODE))
return FALSE
bruteloss = CLAMP((bruteloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
@@ -249,7 +249,7 @@
return
// heal ONE external organ, organ gets randomly selected from damaged ones.
-/mob/living/proc/heal_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE)
+/mob/living/proc/heal_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, required_status)
adjustBruteLoss(-brute, FALSE) //zero as argument for no instant health update
adjustFireLoss(-burn, FALSE)
adjustStaminaLoss(-stamina, FALSE)
@@ -258,7 +258,7 @@
update_stamina()
// damage ONE external organ, organ gets randomly selected from damaged ones.
-/mob/living/proc/take_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE)
+/mob/living/proc/take_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, required_status)
adjustBruteLoss(brute, FALSE) //zero as argument for no instant health update
adjustFireLoss(burn, FALSE)
adjustStaminaLoss(stamina, FALSE)
@@ -267,7 +267,7 @@
update_stamina()
// heal MANY bodyparts, in random order
-/mob/living/proc/heal_overall_damage(brute = 0, burn = 0, stamina = 0, only_robotic = FALSE, only_organic = TRUE, updating_health = TRUE)
+/mob/living/proc/heal_overall_damage(brute = 0, burn = 0, stamina = 0, required_status, updating_health = TRUE)
adjustBruteLoss(-brute, FALSE) //zero as argument for no instant health update
adjustFireLoss(-burn, FALSE)
adjustStaminaLoss(-stamina, FALSE)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 96c8232f35e4..afed282a2f07 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -480,7 +480,7 @@
cure_blind()
cure_husk()
hallucination = 0
- heal_overall_damage(INFINITY, INFINITY, INFINITY, FALSE, FALSE, TRUE) //heal brute and burn dmg on both organic and robotic limbs, and update health right away.
+ heal_overall_damage(INFINITY, INFINITY, INFINITY, null, TRUE) //heal brute and burn dmg on both organic and robotic limbs, and update health right away.
ExtinguishMob()
fire_stacks = 0
confused = 0
@@ -949,7 +949,7 @@
/mob/living/proc/spreadFire(mob/living/L)
if(!istype(L))
return
-
+
if(on_fire)
if(L.on_fire) // If they were also on fire
var/firesplit = (fire_stacks + L.fire_stacks)/2
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index da4ed469d1e3..e2bf5fd05384 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -407,7 +407,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
else
dam = 0
if((brute_heal > 0 && affecting.brute_dam > 0) || (burn_heal > 0 && affecting.burn_dam > 0))
- if(affecting.heal_damage(brute_heal, burn_heal, 0, TRUE, FALSE))
+ if(affecting.heal_damage(brute_heal, burn_heal, 0, BODYPART_ROBOTIC))
H.update_damage_overlays()
user.visible_message("[user] has fixed some of the [dam ? "dents on" : "burnt wires in"] [H]'s [affecting.name].", \
"You fix some of the [dam ? "dents on" : "burnt wires in"] [H]'s [affecting.name].")
diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
index 4ab0c31859a4..2056b26c2914 100644
--- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
@@ -91,7 +91,7 @@
/datum/reagent/drug/crank/overdose_process(mob/living/M)
M.adjustBrainLoss(2*REM)
M.adjustToxLoss(2*REM, 0)
- M.adjustBruteLoss(2*REM, 0)
+ M.adjustBruteLoss(2*REM, FALSE, FALSE, BODYPART_ORGANIC)
..()
. = 1
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index c67344b2e3ad..328801a0f248 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -266,7 +266,7 @@
/datum/reagent/medicine/oxandrolone/overdose_process(mob/living/M)
if(M.getFireLoss()) //It only makes existing burns worse
- M.adjustFireLoss(4.5*REM, 0) // it's going to be healing either 4 or 0.5
+ M.adjustFireLoss(4.5*REM, FALSE, FALSE, BODYPART_ORGANIC) // it's going to be healing either 4 or 0.5
. = 1
..()
@@ -334,8 +334,8 @@
holder.add_reagent("sugar", 1)
holder.remove_reagent("salglu_solution", 0.5)
if(prob(33))
- M.adjustBruteLoss(0.5*REM, 0)
- M.adjustFireLoss(0.5*REM, 0)
+ M.adjustBruteLoss(0.5*REM, FALSE, FALSE, BODYPART_ORGANIC)
+ M.adjustFireLoss(0.5*REM, FALSE, FALSE, BODYPART_ORGANIC)
. = TRUE
..()
@@ -433,8 +433,8 @@
/datum/reagent/medicine/omnizine/overdose_process(mob/living/M)
M.adjustToxLoss(1.5*REM, 0)
M.adjustOxyLoss(1.5*REM, 0)
- M.adjustBruteLoss(1.5*REM, 0)
- M.adjustFireLoss(1.5*REM, 0)
+ M.adjustBruteLoss(1.5*REM, FALSE, FALSE, BODYPART_ORGANIC)
+ M.adjustFireLoss(1.5*REM, FALSE, FALSE, BODYPART_ORGANIC)
..()
. = 1
@@ -506,7 +506,7 @@
/datum/reagent/medicine/sal_acid/overdose_process(mob/living/M)
if(M.getBruteLoss()) //It only makes existing bruises worse
- M.adjustBruteLoss(4.5*REM, 0) // it's going to be healing either 4 or 0.5
+ M.adjustBruteLoss(4.5*REM, FALSE, FALSE, BODYPART_ORGANIC) // it's going to be healing either 4 or 0.5
. = 1
..()
@@ -824,7 +824,7 @@
/datum/reagent/medicine/mannitol/on_mob_life(mob/living/carbon/C)
C.adjustBrainLoss(-2*REM)
..()
-
+
/datum/reagent/medicine/neurine
name = "Neurine"
id = "neurine"
@@ -934,7 +934,7 @@
. = 1
/datum/reagent/medicine/bicaridine/overdose_process(mob/living/M)
- M.adjustBruteLoss(4*REM, 0)
+ M.adjustBruteLoss(4*REM, FALSE, FALSE, BODYPART_ORGANIC)
..()
. = 1
@@ -970,7 +970,7 @@
. = 1
/datum/reagent/medicine/kelotane/overdose_process(mob/living/M)
- M.adjustFireLoss(4*REM, 0)
+ M.adjustFireLoss(4*REM, FALSE, FALSE, BODYPART_ORGANIC)
..()
. = 1
@@ -1028,8 +1028,8 @@
/datum/reagent/medicine/tricordrazine/overdose_process(mob/living/M)
M.adjustToxLoss(2*REM, 0)
M.adjustOxyLoss(2*REM, 0)
- M.adjustBruteLoss(2*REM, 0)
- M.adjustFireLoss(2*REM, 0)
+ M.adjustBruteLoss(2*REM, FALSE, FALSE, BODYPART_ORGANIC)
+ M.adjustFireLoss(2*REM, FALSE, FALSE, BODYPART_ORGANIC)
..()
. = 1
@@ -1128,8 +1128,8 @@
return TRUE
/datum/reagent/medicine/lavaland_extract/overdose_process(mob/living/M)
- M.adjustBruteLoss(3*REM, 0)
- M.adjustFireLoss(3*REM, 0)
+ M.adjustBruteLoss(3*REM, 0, FALSE, BODYPART_ORGANIC)
+ M.adjustFireLoss(3*REM, 0, FALSE, BODYPART_ORGANIC)
M.adjustToxLoss(3*REM, 0)
..()
return TRUE
diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
index 96bf9420d2bd..80fda51b48f2 100644
--- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
@@ -427,7 +427,7 @@
/datum/reagent/toxin/histamine/overdose_process(mob/living/M)
M.adjustOxyLoss(2*REM, 0)
- M.adjustBruteLoss(2*REM, 0)
+ M.adjustBruteLoss(2*REM, FALSE, FALSE, BODYPART_ORGANIC)
M.adjustToxLoss(2*REM, 0)
..()
. = 1
diff --git a/code/modules/research/nanites/nanite_programs/healing.dm b/code/modules/research/nanites/nanite_programs/healing.dm
index 44401188e876..0f07b891f057 100644
--- a/code/modules/research/nanites/nanite_programs/healing.dm
+++ b/code/modules/research/nanites/nanite_programs/healing.dm
@@ -23,7 +23,7 @@
if(!parts.len)
return
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(1/parts.len, 1/parts.len))
+ if(L.heal_damage(1/parts.len, 1/parts.len, null, BODYPART_ORGANIC))
host_mob.update_damage_overlays()
else
host_mob.adjustBruteLoss(-1, TRUE)
@@ -128,7 +128,7 @@
return
var/update = FALSE
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(1/parts.len, 1/parts.len, only_robotic = TRUE, only_organic = FALSE))
+ if(L.heal_damage(1/parts.len, 1/parts.len, null, BODYPART_ROBOTIC))
update = TRUE
if(update)
host_mob.update_damage_overlays()
@@ -172,7 +172,7 @@
return
var/update = FALSE
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(3/parts.len, 3/parts.len))
+ if(L.heal_damage(3/parts.len, 3/parts.len, null, BODYPART_ORGANIC))
update = TRUE
if(update)
host_mob.update_damage_overlays()
diff --git a/code/modules/spells/spell_types/shadow_walk.dm b/code/modules/spells/spell_types/shadow_walk.dm
index 7242c52d4da2..b3208c43a4b4 100644
--- a/code/modules/spells/spell_types/shadow_walk.dm
+++ b/code/modules/spells/spell_types/shadow_walk.dm
@@ -58,7 +58,7 @@
if(light_amount > 0.2) // jaunt ends
end_jaunt(TRUE)
else if (light_amount < 0.2 && (!QDELETED(jaunter))) //heal in the dark
- jaunter.heal_overall_damage(1,1)
+ jaunter.heal_overall_damage(1,1, 0, BODYPART_ORGANIC)
/obj/effect/dummy/phased_mob/shadow/proc/end_jaunt(forced = FALSE)
if(jaunter)
diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm
index 32dd6a88d23b..2c7560927e79 100644
--- a/code/modules/surgery/bodyparts/bodyparts.dm
+++ b/code/modules/surgery/bodyparts/bodyparts.dm
@@ -138,7 +138,7 @@
//Return TRUE to get whatever mob this is in to update health.
/obj/item/bodypart/proc/on_life()
if(stamina_dam > DAMAGE_PRECISION) //DO NOT update health here, it'll be done in the carbon's life.
- if(heal_damage(brute = 0, burn = 0, stamina = stam_heal_tick, only_robotic = FALSE, only_organic = FALSE, updating_health = FALSE))
+ if(heal_damage(brute = 0, burn = 0, stamina = stam_heal_tick, null, updating_health = FALSE))
. |= BODYPART_LIFE_UPDATE_HEALTH
//Applies brute and burn damage to the organ. Returns 1 if the damage-icon states changed at all.
@@ -148,7 +148,7 @@
if(owner && (owner.status_flags & GODMODE))
return FALSE //godmode
- if(required_status && status != required_status)
+ if(required_status && (status != required_status))
return FALSE
var/dmg_mlt = CONFIG_GET(number/damage_multiplier)
@@ -196,12 +196,9 @@
//Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all.
//Damage cannot go below zero.
//Cannot remove negative damage (i.e. apply damage)
-/obj/item/bodypart/proc/heal_damage(brute, burn, stamina, only_robotic = FALSE, only_organic = TRUE, updating_health = TRUE)
+/obj/item/bodypart/proc/heal_damage(brute, burn, stamina, required_status, updating_health = TRUE)
- if(only_robotic && status != BODYPART_ROBOTIC) //This makes organic limbs not heal when the proc is in Robotic mode.
- return
-
- if(only_organic && status != BODYPART_ORGANIC) //This makes robolimbs not healable by chems.
+ if(required_status && (status != required_status)) //So we can only heal certain kinds of limbs, ie robotic vs organic.
return
brute_dam = round(max(brute_dam - brute, 0), DAMAGE_PRECISION)
@@ -223,7 +220,7 @@
//Checks disabled status thresholds
/obj/item/bodypart/proc/update_disabled()
set_disabled(is_disabled())
-
+
/obj/item/bodypart/proc/is_disabled()
if(has_trait(TRAIT_PARALYSIS))
return BODYPART_DISABLED_PARALYSIS
@@ -512,7 +509,7 @@
if(owner.has_trait(TRAIT_PARALYSIS_L_ARM))
return BODYPART_DISABLED_PARALYSIS
return ..()
-
+
/obj/item/bodypart/l_arm/set_disabled(new_disabled)
. = ..()
if(disabled == new_disabled)
@@ -572,7 +569,7 @@
px_y = 0
stam_heal_tick = 2
max_stamina_damage = 50
-
+
/obj/item/bodypart/r_arm/is_disabled()
if(owner.has_trait(TRAIT_PARALYSIS_R_ARM))
return BODYPART_DISABLED_PARALYSIS
@@ -634,7 +631,7 @@
px_y = 12
stam_heal_tick = 2
max_stamina_damage = 50
-
+
/obj/item/bodypart/l_leg/is_disabled()
if(owner.has_trait(TRAIT_PARALYSIS_L_LEG))
return BODYPART_DISABLED_PARALYSIS
@@ -693,7 +690,7 @@
px_y = 12
max_stamina_damage = 50
stam_heal_tick = 2
-
+
/obj/item/bodypart/r_leg/is_disabled()
if(owner.has_trait(TRAIT_PARALYSIS_R_LEG))
return BODYPART_DISABLED_PARALYSIS
diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm
index f2cbf283da84..035b0e541992 100644
--- a/code/modules/surgery/organs/heart.dm
+++ b/code/modules/surgery/organs/heart.dm
@@ -175,6 +175,6 @@
if(owner.health < 5 && world.time > min_next_adrenaline)
min_next_adrenaline = world.time + rand(250, 600) //anywhere from 4.5 to 10 minutes
to_chat(owner, "You feel yourself dying, but you refuse to give up!")
- owner.heal_overall_damage(15, 15)
+ owner.heal_overall_damage(15, 15, 0, BODYPART_ORGANIC)
if(owner.reagents.get_reagent_amount("ephedrine") < 20)
owner.reagents.add_reagent("ephedrine", 10)
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index 5f2376834d7e..3c4fc47396e9 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -305,7 +305,7 @@
cooldown = COOLDOWN_DAMAGE
for(var/V in listeners)
var/mob/living/L = V
- L.heal_overall_damage(10 * power_multiplier, 10 * power_multiplier, 0, FALSE, FALSE)
+ L.heal_overall_damage(10 * power_multiplier, 10 * power_multiplier)
//BRUTE DAMAGE
else if((findtext(message, hurt_words)))
diff --git a/code/modules/zombie/organs.dm b/code/modules/zombie/organs.dm
index 329cc127ab23..46dd1af34329 100644
--- a/code/modules/zombie/organs.dm
+++ b/code/modules/zombie/organs.dm
@@ -80,7 +80,7 @@
//Fully heal the zombie's damage the first time they rise
owner.setToxLoss(0, 0)
owner.setOxyLoss(0, 0)
- owner.heal_overall_damage(INFINITY, INFINITY, INFINITY, FALSE, FALSE, TRUE)
+ owner.heal_overall_damage(INFINITY, INFINITY, INFINITY, null, TRUE)
if(!owner.revive())
return