From 6d9d36bbac780e667168d670afb4e45de9d4cbd5 Mon Sep 17 00:00:00 2001 From: iloveloopers <140007537+iloveloopers@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:10:33 -0400 Subject: [PATCH] Update limbs.dm --- code/modules/organs/limbs.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/organs/limbs.dm b/code/modules/organs/limbs.dm index f2d73c8ce0ec..79117da8d8d3 100644 --- a/code/modules/organs/limbs.dm +++ b/code/modules/organs/limbs.dm @@ -365,7 +365,8 @@ //If limb was damaged before and took enough damage, try to cut or tear it off var/no_perma_damage = owner.status_flags & NO_PERMANENT_DAMAGE - if(previous_brute > 0 && !is_ff && body_part != BODY_FLAG_CHEST && body_part != BODY_FLAG_GROIN && !no_limb_loss && !no_perma_damage) + var/no_bone_break = owner.chem_effect_flags & CHEM_EFFECT_RESIST_FRACTURE + if(previous_brute > 0 && !is_ff && body_part != BODY_FLAG_CHEST && body_part != BODY_FLAG_GROIN && !no_limb_loss && !no_perma_damage && !no_bone_break) if(CONFIG_GET(flag/limbs_can_break) && brute_dam >= max_damage * CONFIG_GET(number/organ_health_multiplier)) var/cut_prob = brute/max_damage * 5 if(prob(cut_prob)) @@ -1091,7 +1092,7 @@ treat_grafted var tells it to apply to grafted but unsalved wounds, for burn kit //if the chance was not set by what called fracture(), the endurance check is done instead if(bonebreak_probability == null) //bone break chance is based on endurance, 25% for survivors, erts, 100% for most everyone else. - bonebreak_probability = 100 / clamp(owner.skills?.get_skill_level(SKILL_ENDURANCE)-1,1,100) //can't be zero + bonebreak_probability = 100 / Clamp(owner.skills?.get_skill_level(SKILL_ENDURANCE)-1,1,100) //can't be zero var/list/bonebreak_data = list("bonebreak_probability" = bonebreak_probability) SEND_SIGNAL(owner, COMSIG_HUMAN_BONEBREAK_PROBABILITY, bonebreak_data)