Makes organ/externa/attack_self() control flow easier to follow, handles embeded non-items

This commit is contained in:
mwerezak
2015-12-05 19:19:39 -05:00
parent a5411f26c5
commit 92b47c94de
+9 -9
View File
@@ -78,15 +78,15 @@
if(istype(I,/obj/item/organ)) if(istype(I,/obj/item/organ))
continue continue
removable_objects |= I removable_objects |= I
if(!removable_objects.len) if(removable_objects.len)
return ..() var/obj/item/I = pick(removable_objects)
var/obj/item/I = pick(removable_objects) I.loc = get_turf(user) //just in case something was embedded that is not an item
if(!istype(I)) if(istype(I))
return ..() if(!(user.l_hand && user.r_hand))
I.loc = get_turf(user) user.put_in_hands(I)
if(!(user.l_hand && user.r_hand)) user.visible_message("<span class='danger'>\The [user] rips \the [I] out of \the [src]!</span>")
user.put_in_hands(I) return //no eating the limb until everything's been removed
user.visible_message("<span class='danger'>\The [user] rips \the [I] out of \the [src]!</span>") return ..()
/obj/item/organ/external/examine() /obj/item/organ/external/examine()
..() ..()