diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index 6cca1117b28..c2487503bfa 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -30,6 +30,7 @@ var/tough = FALSE //can organ be easily damaged? var/emp_proof = FALSE //is the organ immune to EMPs? var/hidden_pain = FALSE //will it skip pain messages? + var/requires_robotic_bodypart = FALSE /obj/item/organ/Destroy() diff --git a/code/modules/surgery/organs/subtypes/machine.dm b/code/modules/surgery/organs/subtypes/machine.dm index cbcf2217b66..f803d51cc04 100644 --- a/code/modules/surgery/organs/subtypes/machine.dm +++ b/code/modules/surgery/organs/subtypes/machine.dm @@ -144,4 +144,5 @@ dead_icon = "posibrain" parent_organ = "chest" status = ORGAN_ROBOT - species = "Machine" \ No newline at end of file + species = "Machine" + requires_robotic_bodypart = TRUE // Can't stick this in someone's chest, unless their chest is robotic \ No newline at end of file diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 11e16d10b1a..32270c329c2 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -101,6 +101,9 @@ if(is_int_organ(tool)) current_type = "insert" I = tool + if(I.requires_robotic_bodypart) + to_chat(user, "[I] is an organ that requires a robotic interface[target].") + return -1 if(target_zone != I.parent_organ || target.get_organ_slot(I.slot)) to_chat(user, "There is no room for [I] in [target]'s [parse_zone(target_zone)]!") return -1 @@ -257,12 +260,14 @@ else if(current_type == "insert") I = tool - user.drop_item() - I.insert(target) - spread_germs_to_organ(I, user, tool) - if(!user.canUnEquip(I, 0)) + if(I.requires_robotic_bodypart) + to_chat(user, "[I] is an organ that requires a robotic interface[target].") + return FALSE + if(!user.drop_item()) to_chat(user, "[I] is stuck to your hand, you can't put it in [target]!") return 0 + I.insert(target) + spread_germs_to_organ(I, user, tool) if(affected) user.visible_message(" [user] has transplanted [tool] into [target]'s [affected.name].",