From 86077f6c1a36534edfc112463516c96c49b2874d Mon Sep 17 00:00:00 2001 From: Anewbe Date: Thu, 19 Jan 2017 15:32:58 -0600 Subject: [PATCH] Broken bones work differently --- .../mob/living/carbon/human/human_organs.dm | 8 ++++---- code/modules/organs/organ_external.dm | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 873a9e1220..4d405504a2 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -54,10 +54,10 @@ if (!lying && !buckled && world.time - l_move_time < 15) //Moving around with fractured ribs won't do you any good - if (E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15)) - var/obj/item/organ/I = pick(E.internal_organs) - custom_pain("You feel broken bones moving in your [E.name]!", 1) - I.take_damage(rand(3,5)) + if (prob(10) && !stat && can_feel_pain() && analgesic < 50 && E.is_broken() && E.internal_organs.len) + custom_pain("Pain jolts through your broken [E.encased ? E.encased : E.name], staggering you!", 50) + drop_item(loc) + Stun(2) //Moving makes open wounds get infected much faster if (E.wounds.len) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 7cd3c8ee75..8c2116ec83 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -257,8 +257,9 @@ I.take_damage(brute / 2) brute -= brute / 2 - if(status & ORGAN_BROKEN && prob(40) && brute) - if(!((species.flags & NO_PAIN) || (robotic >= ORGAN_ROBOT))) + if(status & ORGAN_BROKEN && brute) + jostle_bone(brute) + if(can_feel_pain() && prob(40)) owner.emote("scream") //getting hit on broken hand hurts if(used_weapon) add_autopsy_data("[used_weapon]", brute + burn) @@ -1002,7 +1003,8 @@ Note that amputating the affected organ does in fact remove the infection from t "You hear a loud cracking sound coming from \the [owner].",\ "Something feels like it shattered in your [name]!",\ "You hear a sickening crack.") - if(!(species.flags & NO_PAIN)) + jostle_bone() + if(can_feel_pain()) owner.emote("scream") playsound(src.loc, "fracture", 10, 1, -2) @@ -1207,6 +1209,16 @@ Note that amputating the affected organ does in fact remove the infection from t "You hear a sickening sizzle.") disfigured = 1 +/obj/item/organ/external/proc/jostle_bone(force) + if(!(status & ORGAN_BROKEN)) //intact bones stay still + return + if(brute_dam + force < min_broken_damage/5) //no papercuts moving bones + return + if(internal_organs.len && prob(brute_dam + force)) + owner.custom_pain("A piece of bone in your [encased ? encased : name] moves painfully!", 50) + var/obj/item/organ/I = pick(internal_organs) + I.take_damage(rand(3,5)) + /obj/item/organ/external/proc/get_wounds_desc() . = "" if(status & ORGAN_DESTROYED && !is_stump())