Skip to content

Commit

Permalink
Update brain trauma handling to be commented out
Browse files Browse the repository at this point in the history
  • Loading branch information
Superlagg committed Jul 26, 2024
1 parent a098608 commit 8e803b8
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 30 deletions.
10 changes: 5 additions & 5 deletions code/datums/components/tackle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
20 changes: 10 additions & 10 deletions code/datums/wounds/bones.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions code/modules/mob/living/brain/brain_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
. = ..()
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
18 changes: 18 additions & 0 deletions code/modules/mob/living/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
if(stat == DEAD)
return FALSE

handle_passive_heal() //Passive healing, if applicable

//Tongue wetness code or something
handle_healreservoir()

Expand Down Expand Up @@ -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

Expand Down
13 changes: 7 additions & 6 deletions code/modules/reagents/chemistry/reagents/toxin_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8e803b8

Please sign in to comment.