From 13cac3571ef66b549949bd2d1401713e1ebb7cd4 Mon Sep 17 00:00:00 2001 From: Krausus Date: Mon, 18 May 2015 05:59:31 -0400 Subject: [PATCH] Fixes splinting and broken limb dropping Splints will now work again, on arms/hands/legs/feet, and health analyzers will warn about unsplinted limbs. Having a broken left arm will no longer cause you to drop what's in your right hand. --- code/game/objects/items/devices/scanners.dm | 6 +++--- code/game/objects/items/stacks/medical.dm | 4 ++-- code/modules/mob/living/carbon/human/human_organs.dm | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 019e5f02896..d25883e547c 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -220,10 +220,10 @@ REAGENT SCANNER continue var/limb = e.name if(e.status & ORGAN_BROKEN) - if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!(e.status & ORGAN_SPLINTED))) - user << "\red Unsecured fracture in subject [limb]. Splinting recommended for transport." + if((e.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")) && !(e.status & ORGAN_SPLINTED)) + user.show_message("\red Unsecured fracture in subject [limb]. Splinting recommended for transport.") if(e.has_infected_wound()) - user << "\red Infected wound detected in subject [limb]. Disinfection recommended." + user.show_message("\red Infected wound detected in subject [limb]. Disinfection recommended.") for(var/name in H.organs_by_name) var/obj/item/organ/external/e = H.organs_by_name[name] diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 834dcd33d02..61e24b5932c 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -233,7 +233,7 @@ var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) var/limb = affecting.name - if(!((affecting.name == "l_arm") || (affecting.name == "r_arm") || (affecting.name == "l_leg") || (affecting.name == "r_leg"))) + if(!(affecting.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot"))) user << "\red You can't apply a splint there!" return if(affecting.status & ORGAN_SPLINTED) @@ -242,7 +242,7 @@ if (M != user) user.visible_message("\red [user] starts to apply \the [src] to [M]'s [limb].", "\red You start to apply \the [src] to [M]'s [limb].", "\red You hear something being wrapped.") else - if((!user.hand && affecting.name == "r_arm") || (user.hand && affecting.name == "l_arm")) + if((!user.hand && affecting.limb_name in list("r_arm", "r_hand")) || (user.hand && affecting.limb_name in list("l_arm", "l_hand"))) user << "\red You can't apply a splint to the arm you're using!" return user.visible_message("\red [user] starts to apply \the [src] to their [limb].", "\red You start to apply \the [src] to your [limb].", "\red You hear something being wrapped.") diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index f23657da497..fd516db258a 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -109,7 +109,7 @@ continue if(E.is_broken()) - if(E.body_part == HAND_LEFT) + if((E.body_part == HAND_LEFT) || (E.body_part == ARM_LEFT)) if(!l_hand) continue unEquip(l_hand) @@ -123,7 +123,7 @@ else if(E.is_malfunctioning()) - if(E.body_part == HAND_LEFT) + if((E.body_part == HAND_LEFT) || (E.body_part == ARM_LEFT)) unEquip(l_hand) else unEquip(r_hand)