Skip tool return for tools in root stash

This commit is contained in:
Tyfon
2024-09-19 12:54:13 -07:00
parent 8dc7c775b7
commit 418cbedf5b

View File

@@ -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];
}
}