diff --git a/QuickStackToBag/Lua/Cyka/quickreload_loadmap.lua b/QuickStackToBag/Lua/Cyka/quickreload_loadmap.lua index f4a816b..5b30c2d 100644 --- a/QuickStackToBag/Lua/Cyka/quickreload_loadmap.lua +++ b/QuickStackToBag/Lua/Cyka/quickreload_loadmap.lua @@ -11,6 +11,7 @@ local LOAD_MAP = { }, anechoicdivingsuit = { oxygentank = 1, }, handheldsonar = { batterycell = 1 }, + underwaterscooter = { batterycell = 1 }, } return LOAD_MAP diff --git a/QuickStackToBag/Lua/Cyka/quickstack.lua b/QuickStackToBag/Lua/Cyka/quickstack.lua index d816f0c..f79b95f 100644 --- a/QuickStackToBag/Lua/Cyka/quickstack.lua +++ b/QuickStackToBag/Lua/Cyka/quickstack.lua @@ -353,7 +353,7 @@ local function stackAllToCursor() end for _, slot in ipairs(slots) do - local item + local item, predicate if not slot.slot.items or #slot.slot.items == 0 then MyModGlobal.debugPrint("No items in slot") goto continue @@ -361,7 +361,7 @@ local function stackAllToCursor() item = slot.slot.items[1] MyModGlobal.debugPrint(string.format("Stacking all items to %s", item.Prefab.Identifier.Value)) - utils.enqueueAllOwnedItems({}, function(ititem) + predicate = function(ititem) if ititem.Prefab.Identifier.Value == item.Prefab.Identifier.Value then if item == ititem then return false end -- We are moving items in the predicate because we expect to only @@ -385,7 +385,10 @@ local function stackAllToCursor() return false, true end end - end) + end + + utils.enqueueAllSubmarineItems({}, predicate) + utils.enqueueAllPlayerItems({}, predicate) ::continue:: end