Merge pull request #4075 from Mechoid/NANOMACHINES_SON

Fixes roboheads being crammed onto flesh-bodies.
This commit is contained in:
Anewbe
2017-10-16 01:04:18 -05:00
committed by GitHub

View File

@@ -27,13 +27,16 @@
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>"
to_chat(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>"
to_chat(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>"
to_chat(user, "<span class='warning'>Attaching [E] to [P] wouldn't work well.</span>")
return 0
else if(istype(E, /obj/item/organ/external/head) && E.robotic >= ORGAN_ROBOT && P.robotic < ORGAN_ROBOT)
to_chat(user, "<span class='warning'>Attaching [E] to [P] might break [E].</span>")
return 0
else
return 1