diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 27ca82af7d3..fa3a7c1c05f 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -407,7 +407,7 @@ This function completely restores a damaged organ to perfect condition. var/heal_amt = 0 // if damage >= 50 AFTER treatment then it's probably too severe to heal within the timeframe of a round. - if (W.is_treated() && W.damage < 50) + if (W.is_treated() && W.wound_damage() < 50) heal_amt += 0.5 //we only update wounds once in [wound_update_accuracy] ticks so have to emulate realtime diff --git a/code/modules/organs/wound.dm b/code/modules/organs/wound.dm index cdd732da5a0..a789248627f 100644 --- a/code/modules/organs/wound.dm +++ b/code/modules/organs/wound.dm @@ -81,10 +81,14 @@ src.min_damage = damage_list[current_stage] src.desc = desc_list[current_stage] + // the amount of damage per wound + proc/wound_damage() + return src.damage / src.amount + // checks whether the wound has been appropriately treated // always returns 1 for wounds that are too minor to need treatment proc/is_treated() - if(src.damage / src.amount <= autoheal_cutoff) + if(src.wound_damage() <= autoheal_cutoff) return 1 if(damage_type == BRUISE || damage_type == CUT) @@ -142,7 +146,7 @@ amount -= healed_damage src.damage -= healed_damage - while(src.damage / src.amount < damage_list[current_stage] && current_stage < src.desc_list.len) + while(src.wound_damage() < damage_list[current_stage] && current_stage < src.desc_list.len) current_stage++ desc = desc_list[current_stage] src.min_damage = damage_list[current_stage] @@ -182,7 +186,7 @@ proc/bleeding() // internal wounds don't bleed in the sense of this function - return ((damage > 30 || bleed_timer > 0) && !(bandaged||clamped) && (damage_type == BRUISE && damage >= 20 || damage_type == CUT && damage >= 5) && current_stage <= max_bleeding_stage && !src.internal) + 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) /** CUTS **/ /datum/wound/cut/small