From 32c35951fa1f46f5d6f2c169576a3db86b0dc0f4 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Fri, 2 May 2025 20:33:51 +0200 Subject: sorter wip --- inv_utils.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'inv_utils.lua') 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 } -- cgit v1.2.3-70-g09d2