Prevents attachment of limbs over limb stumps while still allowing FBP construction

This commit is contained in:
Anewbe
2017-07-27 17:40:32 -05:00
parent 5da48fd2cc
commit 6fda2e8c59

View File

@@ -25,15 +25,16 @@
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
var/obj/item/organ/external/P = target.organs_by_name[E.parent_organ]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected)
user << "<span class='warning'>Something is in the way! You can't attach [E] here!</span>"
return 0
if(!P)
user << "<span class='warning'>There's nothing to attach [E] to!</span>"
return 0
else if((P.robotic >= ORGAN_ROBOT) && (E.robotic < ORGAN_ROBOT))
user << "<span class='warning'>Attaching [E] to [P] wouldn't work well.</span>"
return 0
else if(P.children.len)
user << "<span class='warning'>Something is in the way! You can't attach [E] here!</span>"
return 0
else
return 1