From 094f7958443b695b937fbe9af00a8ae2b0b7d55c Mon Sep 17 00:00:00 2001 From: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Date: Sun, 6 Oct 2024 10:12:00 +0530 Subject: [PATCH] Stops drone held tools from being force moved (#87037) ## About The Pull Request - Fixes #86989 The component `/datum/component/holderloving` doesn't help with this case. This is because camera assemblies uses `temporarilyRemoveItemFromInventory()` which does not trigger a force move so this component does nothing. `temporarilyRemoveItemFromInventory()` does however check for trait `TRAIT_NODROP` which we add to our drone tools to stop it from being force moved ## Changelog :cl: fix: tools from the drone toolbox cannot be forcefully removed in certain situations e.g. when using the drone gas analyser to upgrade the camera assembly /:cl: --- code/modules/mob/living/basic/drone/drone_tools.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/living/basic/drone/drone_tools.dm b/code/modules/mob/living/basic/drone/drone_tools.dm index 2150ad0f7e2..6f3f79bff50 100644 --- a/code/modules/mob/living/basic/drone/drone_tools.dm +++ b/code/modules/mob/living/basic/drone/drone_tools.dm @@ -41,8 +41,10 @@ builtintools += new /obj/item/t_scanner/drone(src) builtintools += new /obj/item/analyzer/drone(src) builtintools += new /obj/item/soap/drone(src) + for(var/obj/item/tool as anything in builtintools) tool.AddComponent(/datum/component/holderloving, src, TRUE) + ADD_TRAIT(tool, TRAIT_NODROP, REF(src)) /obj/item/crowbar/drone