From 616b4ab1df3757f68080f0af0aadc75a3841fe0f Mon Sep 17 00:00:00 2001 From: Adrer Date: Fri, 13 Oct 2023 15:28:31 +0200 Subject: [PATCH] You can no longer reattach limbs when parent limb is not there. (#22838) Co-authored-by: adrermail@gmail.com --- code/modules/surgery/limb_reattach.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index 7951918ae02..43d2d314cc8 100644 --- a/code/modules/surgery/limb_reattach.dm +++ b/code/modules/surgery/limb_reattach.dm @@ -108,6 +108,9 @@ if(isnull(organ_data)) to_chat(user, "[target.dna.species] don't have the anatomy for [E.name]!") return SURGERY_BEGINSTEP_ABORT + if(!target.bodyparts_by_name[E.parent_organ]) + to_chat(user, "[target] doesn't have a [parse_zone(E.parent_organ)] to attach the [E.name] to!") + return SURGERY_BEGINSTEP_ABORT if(length(E.search_contents_for(/obj/item/organ/internal/brain)) && target.get_int_organ(/obj/item/organ/internal/brain)) to_chat(user, "Both [target] and [E.name] contain a brain, and [target] can't have two brains!") return SURGERY_BEGINSTEP_ABORT