summaryrefslogtreecommitdiff
path: root/inv_utils.lua
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2025-05-02 20:33:51 +0200
committerBotond Hende <nettingman@gmail.com>2025-05-02 20:33:51 +0200
commit32c35951fa1f46f5d6f2c169576a3db86b0dc0f4 (patch)
tree54ca5a5c6198ad3e4421c892e5277cf3c72cb77c /inv_utils.lua
parent2f5e88fd789db0dc5c6f0db0c173ce818bd6ab37 (diff)
sorter wip
Diffstat (limited to 'inv_utils.lua')
-rw-r--r--inv_utils.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/inv_utils.lua b/inv_utils.lua
index 872647d..9a6e280 100644
--- a/inv_utils.lua
+++ b/inv_utils.lua
@@ -6,6 +6,16 @@ local function hasItemsInStorage(storage)
return false
end
+local function hasItemsInTurtle()
+ for ii = 1, 16 do
+ if turtle.getItemCount(ii) > 0 then
+ return true
+ end
+ end
+
+ return false
+end
+
local function getEmptySlotInStorage(storage)
return 5 -- TODO
end
@@ -18,4 +28,4 @@ local function swapSlotsInStorage(storage, slotA, slotB)
end
-return { hasItemsInStorage = hasItemsInStorage, swapSlotsInStorage = swapSlotsInStorage }
+return { hasItemsInStorage = hasItemsInStorage, hasItemsInTurtle = hasItemsInTurtle, swapSlotsInStorage = swapSlotsInStorage }