From 418cbedf5b1263915254543492a7b9a813290dc0 Mon Sep 17 00:00:00 2001 From: Tyfon <29051038+tyfon7@users.noreply.github.com> Date: Thu, 19 Sep 2024 12:54:13 -0700 Subject: [PATCH] Skip tool return for tools in root stash --- server/src/mod.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/src/mod.ts b/server/src/mod.ts index c4dfa83..5907ee0 100644 --- a/server/src/mod.ts +++ b/server/src/mod.ts @@ -74,6 +74,15 @@ class UIFixes implements IPreSptLoadMod { const originalTool = pmcData.Inventory.items.find( x => x._id === requestTools[i].id ); + + // If the tool is in the stash itself, skip it. Same check as InventoryHelper.isItemInStash + if ( + originalTool.parentId === pmcData.Inventory.stash && + originalTool.slotId === "hideout" + ) { + continue; + } + tools[i]["uifixes.returnTo"] = [originalTool.parentId, originalTool.slotId]; } }