From 0f373cb58bbf9b0c792db40178c33b5e2df54fe4 Mon Sep 17 00:00:00 2001 From: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com> Date: Thu, 25 Aug 2022 10:48:05 +0800 Subject: [PATCH] Stop stacks merging when in a machine and not being used as a construction part, fixes #68456 (#69295) --- code/game/objects/items/stacks/stack.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index e6977643697..4aeb5d0b8e6 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -572,6 +572,10 @@ return FALSE if(ismob(loc) && !inhand) // no merging with items that are on the mob return FALSE + if(istype(loc, /obj/machinery)) // no merging items in machines that aren't both in componentparts + var/obj/machinery/machine = loc + if(!(src in machine.component_parts) || !(check in machine.component_parts)) + return FALSE return TRUE /**