From 2f5e88fd789db0dc5c6f0db0c173ce818bd6ab37 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Fri, 2 May 2025 14:31:17 +0200 Subject: sorter wip --- inv_utils.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'inv_utils.lua') diff --git a/inv_utils.lua b/inv_utils.lua index 830e39e..872647d 100644 --- a/inv_utils.lua +++ b/inv_utils.lua @@ -1,3 +1,11 @@ +local function hasItemsInStorage(storage) + for _, _ in pairs(storage.list()) do + return true + end + + return false +end + local function getEmptySlotInStorage(storage) return 5 -- TODO end @@ -10,4 +18,4 @@ local function swapSlotsInStorage(storage, slotA, slotB) end -return { swapSlotsInStorage = swapSlotsInStorage } +return { hasItemsInStorage = hasItemsInStorage, swapSlotsInStorage = swapSlotsInStorage } -- cgit v1.2.3-70-g09d2