Fixes delta damage calculation for organs (and brain getting traumas not from damage, but from mannitol healing) (#95103)

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
This commit is contained in:
Iajret
2026-02-11 08:00:36 +01:00
committed by GitHub
co-authored by SmArtKar
parent 7e7eabd5a9
commit 3f00e8d37a
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -356,8 +356,8 @@
var/delta_dam = . //for the sake of clarity
if(isnull(bodypart_owner)) // no need to color it if it's in someone's noggin
update_brain_color()
if(delta_dam > 0 && damage > BRAIN_DAMAGE_MILD)
roll_for_brain_trauma(delta_dam)
if(delta_dam < 0 && damage > BRAIN_DAMAGE_MILD)
roll_for_brain_trauma(-delta_dam) // parent call returns negative numbers if take damage and positive if we heal
/// Rolls a random chance to gain a brain trauma based on damage taken and current damage level
/obj/item/organ/brain/proc/roll_for_brain_trauma(delta_dam)
@@ -467,8 +467,8 @@
/obj/item/organ/stomach/apply_organ_damage(damage_amount, maximum, required_organ_flag)
. = ..()
// So after a while, or a bunch of stomach meds, even a cut stomach can recover
if (. < 0)
cut_open_damage = max(0, cut_open_damage + .)
if (. > 0)
cut_open_damage = max(0, cut_open_damage - .)
/obj/item/organ/stomach/examine(mob/user)
. = ..()