From 8e803b82ef178f5f2103ab491ecf61b70ac7ba1b Mon Sep 17 00:00:00 2001 From: Superlagg Date: Fri, 26 Jul 2024 15:24:37 -0700 Subject: [PATCH 1/2] Update brain trauma handling to be commented out --- code/datums/components/tackle.dm | 10 +++++----- code/datums/wounds/bones.dm | 20 +++++++++---------- code/modules/mob/living/brain/brain_item.dm | 14 ++++++------- .../mob/living/carbon/human/species.dm | 4 ++-- code/modules/mob/living/life.dm | 18 +++++++++++++++++ .../chemistry/reagents/toxin_reagents.dm | 13 ++++++------ 6 files changed, 49 insertions(+), 30 deletions(-) diff --git a/code/datums/components/tackle.dm b/code/datums/components/tackle.dm index 432718b31f..5543bd1cb6 100644 --- a/code/datums/components/tackle.dm +++ b/code/datums/components/tackle.dm @@ -176,7 +176,7 @@ var/obj/item/bodypart/head/hed = user.get_bodypart(BODY_ZONE_HEAD) if(hed) hed.receive_damage(brute=20, updating_health=TRUE) - user.gain_trauma(/datum/brain_trauma/mild/concussion) + // user.gain_trauma(/datum/brain_trauma/mild/concussion) if(-4 to -2) // glancing blow at best user.visible_message(span_warning("[user] lands a weak [tackle_word] on [target], briefly knocking [target.p_them()] off-balance!"), span_userdanger("I land a weak [tackle_word] on [target], briefly knocking [target.p_them()] off-balance!"), target) @@ -510,7 +510,7 @@ user.adjustStaminaLoss(30) user.adjustBruteLoss(80) user.Unconscious(100) - user.gain_trauma_type(BRAIN_TRAUMA_MILD) + // user.gain_trauma_type(BRAIN_TRAUMA_MILD) playsound(user, 'sound/effects/blobattack.ogg', 60, TRUE) playsound(user, 'sound/effects/splat.ogg', 70, TRUE) user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9) @@ -524,7 +524,7 @@ user.adjustStaminaLoss(100) user.adjustBruteLoss(30) user.Unconscious(100) - user.gain_trauma_type(BRAIN_TRAUMA_MILD) + // user.gain_trauma_type(BRAIN_TRAUMA_MILD) user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9) shake_camera(user, 6, 6) user.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash) @@ -535,8 +535,8 @@ user.adjustStaminaLoss(30) user.adjustBruteLoss(30) user.confused += 15 - if(prob(80)) - user.gain_trauma(/datum/brain_trauma/mild/concussion) + // if(prob(80)) + // user.gain_trauma(/datum/brain_trauma/mild/concussion) user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9) user.DefaultCombatKnockdown(40) shake_camera(user, 5, 5) diff --git a/code/datums/wounds/bones.dm b/code/datums/wounds/bones.dm index 26e5c98d1c..a45af8ba70 100644 --- a/code/datums/wounds/bones.dm +++ b/code/datums/wounds/bones.dm @@ -34,10 +34,10 @@ Overwriting of base procs */ /datum/wound/blunt/wound_injury(datum/wound/old_wound = null) - if(limb.body_zone == BODY_ZONE_HEAD && brain_trauma_group) - processes = TRUE - active_trauma = victim.gain_trauma_type(brain_trauma_group, TRAUMA_RESILIENCE_WOUND) - next_trauma_cycle = world.time + (rand(100-WOUND_BONE_HEAD_TIME_VARIANCE, 100+WOUND_BONE_HEAD_TIME_VARIANCE) * 0.01 * trauma_cycle_cooldown) + // if(limb.body_zone == BODY_ZONE_HEAD && brain_trauma_group) + // processes = TRUE + // active_trauma = victim.gain_trauma_type(brain_trauma_group, TRAUMA_RESILIENCE_WOUND) + // next_trauma_cycle = world.time + (rand(100-WOUND_BONE_HEAD_TIME_VARIANCE, 100+WOUND_BONE_HEAD_TIME_VARIANCE) * 0.01 * trauma_cycle_cooldown) RegisterSignal(victim, COMSIG_HUMAN_EARLY_UNARMED_ATTACK,PROC_REF(attack_with_hurt_hand)) if(limb.held_index && victim.get_item_for_held_index(limb.held_index) && (disabling || prob(30 * severity))) @@ -59,12 +59,12 @@ /datum/wound/blunt/handle_process() . = ..() - if(limb.body_zone == BODY_ZONE_HEAD && brain_trauma_group && world.time > next_trauma_cycle) - if(active_trauma) - QDEL_NULL(active_trauma) - else - active_trauma = victim.gain_trauma_type(brain_trauma_group, TRAUMA_RESILIENCE_WOUND) - next_trauma_cycle = world.time + (rand(100-WOUND_BONE_HEAD_TIME_VARIANCE, 100+WOUND_BONE_HEAD_TIME_VARIANCE) * 0.01 * trauma_cycle_cooldown) + // if(limb.body_zone == BODY_ZONE_HEAD && brain_trauma_group && world.time > next_trauma_cycle) + // if(active_trauma) + // QDEL_NULL(active_trauma) + // else + // active_trauma = victim.gain_trauma_type(brain_trauma_group, TRAUMA_RESILIENCE_WOUND) + // next_trauma_cycle = world.time + (rand(100-WOUND_BONE_HEAD_TIME_VARIANCE, 100+WOUND_BONE_HEAD_TIME_VARIANCE) * 0.01 * trauma_cycle_cooldown) if(!regen_points_needed) return diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm index 24264ebd49..2efa1fe0b3 100644 --- a/code/modules/mob/living/brain/brain_item.dm +++ b/code/modules/mob/living/brain/brain_item.dm @@ -227,13 +227,13 @@ . = ..() if(!. || !owner) return - if(damage >= BRAIN_DAMAGE_DEATH) //rip - if(owner.stat != DEAD) - to_chat(owner, span_userdanger("The last spark of life in your brain fizzles out...")) - owner.death() - brain_death = TRUE - else - brain_death = FALSE + // if(damage >= BRAIN_DAMAGE_DEATH) //rip + // if(owner.stat != DEAD) + // to_chat(owner, span_userdanger("The last spark of life in your brain fizzles out...")) + // owner.death() + // brain_death = TRUE + // else + // brain_death = FALSE /obj/item/organ/brain/check_damage_thresholds(mob/M) . = ..() diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index d9099849cd..6c6ba0eba2 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -2076,8 +2076,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) span_userdanger("I have been knocked senseless!")) H.confused = max(H.confused, 20) H.adjust_blurriness(10) - if(prob(10)) - H.gain_trauma(/datum/brain_trauma/mild/concussion) + // if(prob(10)) + // H.gain_trauma(/datum/brain_trauma/mild/concussion) else H.adjustOrganLoss(ORGAN_SLOT_BRAIN, totitemdamage * 0.2) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index de50b47b74..b9e895000c 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -62,6 +62,8 @@ if(stat == DEAD) return FALSE + handle_passive_heal() //Passive healing, if applicable + //Tongue wetness code or something handle_healreservoir() @@ -116,6 +118,22 @@ machine.check_eye(src) return TRUE +/mob/living/proc/handle_passive_heal() + var/brut = getBruteLoss() + var/fire = getFireLoss() + var/oxy = getOxyLoss() + var/tox = getToxLoss() + + + if(brut > 0 || fire > 0 || oxy > 0 || tox > 0) + var/adjustby = brut + fire + oxy + tox + var/actuallyadjustby = clamp(adjustby/10, 0, adjustby) + adjustBruteLoss(-actuallyadjustby) + adjustFireLoss(-actuallyadjustby) + adjustOxyLoss(-actuallyadjustby) + adjustToxLoss(-actuallyadjustby, force_be_heal = TRUE) + adjustStaminaLoss(actuallyadjustby) + /mob/living/proc/handle_breathing(times_fired) return diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 942452b2e4..6b5464bb6a 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -1149,12 +1149,13 @@ value = REAGENT_VALUE_EXCEPTIONAL /datum/reagent/toxin/brainhurtingjuice/on_mob_life(mob/living/carbon/M) - if(prob(50)) - M.gain_trauma_type(BRAIN_TRAUMA_MILD) - else if(prob(50)) - M.gain_trauma_type(BRAIN_TRAUMA_SEVERE) - else - M.gain_trauma_type(BRAIN_TRAUMA_SPECIAL) + to_chat(M, span_warning("My brain hurts! Oof ouch.")) + // if(prob(50)) + // M.gain_trauma_type(BRAIN_TRAUMA_MILD) + // else if(prob(50)) + // M.gain_trauma_type(BRAIN_TRAUMA_SEVERE) + // else + // M.gain_trauma_type(BRAIN_TRAUMA_SPECIAL) ..() /datum/reagent/toxin/bungotoxin From 9943a6bd88ae0a27bb6607d9c4b537a1f17393a7 Mon Sep 17 00:00:00 2001 From: Superlagg Date: Fri, 26 Jul 2024 15:26:19 -0700 Subject: [PATCH 2/2] chore: Update adjustBruteLoss calculation in life.dm --- code/modules/mob/living/life.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index b9e895000c..adc9d6d090 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -127,7 +127,7 @@ if(brut > 0 || fire > 0 || oxy > 0 || tox > 0) var/adjustby = brut + fire + oxy + tox - var/actuallyadjustby = clamp(adjustby/10, 0, adjustby) + var/actuallyadjustby = clamp((adjustby/10) + 5, 0, adjustby) adjustBruteLoss(-actuallyadjustby) adjustFireLoss(-actuallyadjustby) adjustOxyLoss(-actuallyadjustby)