From 9cebb9708eaf6af7cccdf7f58f8c63d2dcee54f4 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Jul 2014 13:22:52 -0400 Subject: [PATCH] Makes bleeding logic a little clearer --- code/modules/organs/organ_external.dm | 3 +-- code/modules/organs/wound.dm | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index f597f06e35e..8513dccfcf8 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -354,8 +354,7 @@ INFECTION_LEVEL_TWO above this germ level the infection will start to spread to INFECTION_LEVEL_THREE above this germ level the player will take additional toxin damage per second, and will die in minutes without antitox. also, above this germ level you will need to overdose on spaceacillin to reduce the germ_level. -Note that amputating the affected organ does in fact remove the infection from the -player's body, though, antitox and spaceacillin are easy enough to get I doubt it will ever be needed. +Note that amputating the affected organ does in fact remove the infection from the player's body. */ /datum/organ/external/proc/update_germs() diff --git a/code/modules/organs/wound.dm b/code/modules/organs/wound.dm index e2763d4697a..3f4073d3f1a 100644 --- a/code/modules/organs/wound.dm +++ b/code/modules/organs/wound.dm @@ -183,10 +183,20 @@ return 1 - proc/bleeding() - // internal wounds don't bleed in the sense of this function - return ((wound_damage() > 30 || bleed_timer > 0) && !(bandaged||clamped) && (damage_type == BRUISE && wound_damage() >= 20 || damage_type == CUT && wound_damage() >= 5) && current_stage <= max_bleeding_stage && !src.internal) + if (src.internal) + return 0 // internal wounds don't bleed in the sense of this function + + if (current_stage > max_bleeding_stage) + return 0 + + if (bandaged||clamped) + return 0 + + if (wound_damage() <= 30 && bleed_timer <= 0) + return 0 //Bleed timer has run out. Wounds with more than 30 damage don't stop bleeding on their own. + + return (damage_type == BRUISE && wound_damage() >= 20 || damage_type == CUT && wound_damage() >= 5) /** CUTS **/ /datum/wound/cut/small