From 77a6acbeb0ee8044e6b81fd9ae43e7398d5472a7 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 4 Aug 2022 15:44:03 +0100 Subject: storage --- storage.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/storage.lua b/storage.lua index 5128acd..237d058 100644 --- a/storage.lua +++ b/storage.lua @@ -12,6 +12,13 @@ local chests = {} for _,ty in ipairs(chest_types) do -- don't want sides, only ones over a network local tc = { peripheral.find(ty,function(n,p) return not sides[n] end) } - for _,c in ipairs(tc) do chests[c] = true end + for _,chest in ipairs(tc) do + local name = peripheral.getName(chest) + chests[name] = { + content = chest.list() + size = chest.size() + pphl = chest + } + end end return chests -- cgit v1.2.3