From 40c6558dd612770cebbd262414f3377c7500a732 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 12 Sep 2022 08:10:37 +0200 Subject: [PATCH] [MIRROR] Fixes some cases of adjusting wound blood flow to use the hlper [MDB IGNORE] (#16051) * Fixes some cases of adjusting wound blood flow to use the helper (#69513) Makes blood flow adjustments use the blood flow adjustment helper. * Fixes some cases of adjusting wound blood flow to use the hlper * modular Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: John Doe --- code/datums/wounds/slash.dm | 2 +- code/modules/antagonists/heretic/knowledge/blade_lore.dm | 4 ++-- .../heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm | 6 ++++-- modular_skyrat/modules/medical/code/wounds/slash.dm | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/code/datums/wounds/slash.dm b/code/datums/wounds/slash.dm index 2c65a33796d..972bea16899 100644 --- a/code/datums/wounds/slash.dm +++ b/code/datums/wounds/slash.dm @@ -224,7 +224,7 @@ if(!lasgun.process_fire(victim, victim, TRUE, null, limb.body_zone)) return victim.emote("scream") - blood_flow -= damage / (5 * self_penalty_mult) // 20 / 5 = 4 bloodflow removed, p good + adjust_blood_flow(-1 * (damage / (5 * self_penalty_mult))) // 20 / 5 = 4 bloodflow removed, p good victim.visible_message(span_warning("The cuts on [victim]'s [limb.plaintext_zone] scar over!")) /// If someone is using either a cautery tool or something with heat to cauterize this cut diff --git a/code/modules/antagonists/heretic/knowledge/blade_lore.dm b/code/modules/antagonists/heretic/knowledge/blade_lore.dm index a66ee4fc237..3fa045229b0 100644 --- a/code/modules/antagonists/heretic/knowledge/blade_lore.dm +++ b/code/modules/antagonists/heretic/knowledge/blade_lore.dm @@ -219,7 +219,7 @@ route = PATH_BLADE /// The amount of blood flow reduced per level of severity of gained bleeding wounds for Stance of the Torn Champion. -#define BLOOD_FLOW_PER_SEVEIRTY 1 +#define BLOOD_FLOW_PER_SEVEIRTY -1 /datum/heretic_knowledge/duel_stance name = "Stance of the Torn Champion" @@ -268,7 +268,7 @@ if(gained_wound.blood_flow <= 0) return - gained_wound.blood_flow -= (gained_wound.severity * BLOOD_FLOW_PER_SEVEIRTY) + gained_wound.adjust_blood_flow(gained_wound.severity * BLOOD_FLOW_PER_SEVEIRTY) /datum/heretic_knowledge/duel_stance/proc/on_health_update(mob/living/source) SIGNAL_HANDLER diff --git a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm index 55115e0c2f4..fbf9f0c2b1a 100644 --- a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm +++ b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm @@ -102,5 +102,7 @@ if(iter_wound.blood_flow && (iter_wound.blood_flow > bloodiest_wound?.blood_flow)) bloodiest_wound = iter_wound - if(bloodiest_wound) - bloodiest_wound.set_blood_flow(max(0, bloodiest_wound.blood_flow - 0.5)) + if(!bloodiest_wound) + return + + bloodiest_wound.adjust_blood_flow(-0.5) diff --git a/modular_skyrat/modules/medical/code/wounds/slash.dm b/modular_skyrat/modules/medical/code/wounds/slash.dm index 0ca19682deb..669b8730d14 100644 --- a/modular_skyrat/modules/medical/code/wounds/slash.dm +++ b/modular_skyrat/modules/medical/code/wounds/slash.dm @@ -225,7 +225,7 @@ if(!lasgun.process_fire(victim, victim, TRUE, null, limb.body_zone)) return victim.emote("scream") - blood_flow -= damage / (5 * self_penalty_mult) // 20 / 5 = 4 bloodflow removed, p good + adjust_blood_flow(-1 * (damage / (5 * self_penalty_mult))) // 20 / 5 = 4 bloodflow removed, p good victim.visible_message(span_warning("The cuts on [victim]'s [parse_zone(limb.body_zone)] scar over!")) /// If someone is using either a cautery tool or something with heat to cauterize this cut