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.
This commit is contained in:
Krausus
2015-05-18 05:59:31 -04:00
parent fc4863f97c
commit 13cac3571e
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -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]
+2 -2
View File
@@ -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.")
@@ -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)