mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Fixes ODing on crank/other chems, viruses, and other things damaging/healing robotic limbs. (#41593)
cl ShizCalev fix: Fixed chem OD's causing damage to robotic limbs. fix: Fixed wood golems repairing robotic limbs every tick of life() fix: Fixed vampires repairing robotic limbs every tick of life()... fix: Fixed shadowpeople healing robotic limbs every tick of life() fix: Fixed poppeople healing robotic limbs every tick of life() fix: Fixed adjustBruteLoss and adjustFireLoss not properly discriminating for limb status types. tweak: Fixed bibles healing robotic limbs, because your false deity can't fix SCIENCE. fix: Fixed the Starlight Condensation, Nocturnal Regeneration, Tissue Hydration, Regenerative Coma, and Radioactive Resonance virus symptoms repairing robotic limbs. /cl Gonna be away the next two weeks, so if there's anything major after today just go ahead and close it and I'll fix it when I get back.
This commit is contained in:
committed by
yogstation13-bot
parent
c0bffd5d5c
commit
6dd67981ce
@@ -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, "<span class='notice'>The darkness soothes and mends your wounds.</span>")
|
||||
|
||||
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, "<span class='notice'>You feel yourself absorbing the water around you to soothe your damaged skin.</span>")
|
||||
|
||||
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, "<span class='notice'>The pain from your wounds fades rapidly.</span>")
|
||||
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, "<span class='notice'>Your skin glows faintly, and you feel your wounds mending themselves.</span>")
|
||||
|
||||
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
|
||||
|
||||
@@ -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("<span class='notice'>[user] heals [H] with the power of [deity_name]!</span>")
|
||||
to_chat(H, "<span class='boldnotice'>May the power of [deity_name] compel you to be healed!</span>")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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])
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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].", \
|
||||
"<span class='notice'>You fix some of the [dam ? "dents on" : "burnt wires in"] [H]'s [affecting.name].</span>")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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, "<span class='userdanger'>You feel yourself dying, but you refuse to give up!</span>")
|
||||
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)
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user