diff options
Diffstat (limited to 'inv_utils.lua')
-rw-r--r-- | inv_utils.lua | 12 |
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 } |