First stack submarine items then player items
This commit is contained in:
@@ -11,6 +11,7 @@ local LOAD_MAP = {
|
||||
},
|
||||
anechoicdivingsuit = { oxygentank = 1, },
|
||||
handheldsonar = { batterycell = 1 },
|
||||
underwaterscooter = { batterycell = 1 },
|
||||
}
|
||||
|
||||
return LOAD_MAP
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user