From 1ec336f5d2a36453162c8d564799cb098fc060fa Mon Sep 17 00:00:00 2001 From: harryob <55142896+harryob@users.noreply.github.com> Date: Thu, 29 Jun 2023 15:29:54 +0100 Subject: [PATCH] i can't believe we never fixed this --- code/__DEFINES/traits.dm | 3 +++ code/game/objects/items/devices/motion_detector.dm | 3 ++- code/modules/surgery/implant.dm | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index e5441090d60c..dd700ccde996 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -211,6 +211,9 @@ //ie. naming a regulation tape "example" will become regulation tape (example) #define TRAIT_ITEM_RENAME_SPECIAL "t_item_rename_special" +// This item can't be implanted into someone, regardless of the size of the item. +#define TRAIT_ITEM_NOT_IMPLANTABLE "t_item_not_implantable" + //-- structure traits -- // TABLE TRAITS /// If the table is being flipped, prevent any changes that will mess with adjacency handling diff --git a/code/game/objects/items/devices/motion_detector.dm b/code/game/objects/items/devices/motion_detector.dm index 01858ed486d0..ade74531bc91 100644 --- a/code/game/objects/items/devices/motion_detector.dm +++ b/code/game/objects/items/devices/motion_detector.dm @@ -22,6 +22,7 @@ item_state = "motion_detector" flags_atom = FPRINT| CONDUCT flags_equip_slot = SLOT_WAIST + inherent_traits = list(TRAIT_ITEM_NOT_IMPLANTABLE) var/list/blip_pool = list() var/detector_range = 14 var/detector_mode = MOTION_DETECTOR_LONG @@ -309,7 +310,7 @@ name = "hacked motion detector" desc = "A device that usually picks up non-USCM signals, but this one's been hacked to detect all non-freelancer movement instead. Fight fire with fire!" iff_signal = FACTION_MERCENARY - + /obj/item/device/motiondetector/hacked/pmc name = "corporate motion detector" desc = "A device that usually picks up non-USCM signals, but this one's been reprogrammed to detect all non-PMC movement instead. Very corporate." diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm index cebd4b44da7d..8f2e6156831a 100644 --- a/code/modules/surgery/implant.dm +++ b/code/modules/surgery/implant.dm @@ -106,6 +106,8 @@ if(.) if(is_surgery_tool(tool)) //Make sure you still have all your tools after a surgery. return FALSE + if(HAS_TRAIT(tool, TRAIT_ITEM_NOT_IMPLANTABLE)) + return FALSE if(tool.w_class > get_max_wclass(surgery)) to_chat(user, SPAN_WARNING("[tool] is too big to implant into [surgery.target]'s [surgery.affected_limb.cavity]!")) return FALSE