From 0e9c2f7b612d15886aaa2180b2009ad116b49e4d Mon Sep 17 00:00:00 2001 From: Waterpig <49160555+Majkl-J@users.noreply.github.com> Date: Tue, 28 Nov 2023 21:49:47 +0100 Subject: [PATCH] The synth brain surgery now targets the chest and only applies for synths (#25308) * It's a synth surgery * This might be a bit better * organising --- .../synths/code/surgery/robot_brain_surgery.dm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modular_skyrat/modules/synths/code/surgery/robot_brain_surgery.dm b/modular_skyrat/modules/synths/code/surgery/robot_brain_surgery.dm index 4be04a84839..02b45a36fea 100644 --- a/modular_skyrat/modules/synths/code/surgery/robot_brain_surgery.dm +++ b/modular_skyrat/modules/synths/code/surgery/robot_brain_surgery.dm @@ -10,10 +10,17 @@ ) target_mobtypes = list(/mob/living/carbon/human) - possible_locs = list(BODY_ZONE_HEAD) + possible_locs = list(BODY_ZONE_CHEST) // The brains are in the chest requires_bodypart_type = BODYTYPE_ROBOTIC desc = "A surgical procedure that restores the default behavior logic and personality matrix of an IPC posibrain." +/datum/surgery/robot_brain_surgery/can_start(mob/user, mob/living/carbon/target, obj/item/tool) + var/obj/item/organ/internal/brain/synth/brain = target.get_organ_slot(ORGAN_SLOT_BRAIN) + if(!istype(brain) && !issynthetic(target)) + return FALSE + else + return TRUE + /datum/surgery_step/fix_robot_brain name = "fix posibrain" implements = list( @@ -24,10 +31,6 @@ repeatable = TRUE time = 12 SECONDS //long and complicated -/datum/surgery/robot_brain_surgery/can_start(mob/user, mob/living/carbon/target, obj/item/tool) - var/obj/item/organ/internal/brain/brain = target.get_organ_slot(ORGAN_SLOT_BRAIN) - return !!brain - /datum/surgery_step/fix_robot_brain/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user,