From a76b19bac7ab889488bf6666d8056dc2bf458e69 Mon Sep 17 00:00:00 2001 From: Adrer Date: Wed, 14 Jun 2023 21:58:47 +0200 Subject: [PATCH] Prevents the installation of a second brain (#21321) Co-authored-by: adrermail@gmail.com --- code/modules/surgery/limb_reattach.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index 4d81b7eb9ed..41779668aad 100644 --- a/code/modules/surgery/limb_reattach.dm +++ b/code/modules/surgery/limb_reattach.dm @@ -106,7 +106,10 @@ return SURGERY_BEGINSTEP_ABORT var/list/organ_data = target.dna.species.has_limbs["[user.zone_selected]"] if(isnull(organ_data)) - to_chat(user, "[target.dna.species] don't have the anatomy for [E.name]!") + to_chat(user, "[target.dna.species] don't have the anatomy for [E.name]!") + return SURGERY_BEGINSTEP_ABORT + if(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 user.visible_message(