summaryrefslogtreecommitdiff
path: root/inv_utils.lua
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2025-05-02 14:31:17 +0200
committerBotond Hende <nettingman@gmail.com>2025-05-02 14:31:17 +0200
commit2f5e88fd789db0dc5c6f0db0c173ce818bd6ab37 (patch)
tree4246e6b6b48b05e262b003a9487f313e9a2c8ecf /inv_utils.lua
parentbd781775b7741aae4b722f36cb18caba2e40cc94 (diff)
sorter wip
Diffstat (limited to 'inv_utils.lua')
-rw-r--r--inv_utils.lua10
1 files changed, 9 insertions, 1 deletions
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 }