diff options
author | ubq323 <ubq323@ubq323.website> | 2022-08-04 15:44:03 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-08-04 15:44:03 +0100 |
commit | 77a6acbeb0ee8044e6b81fd9ae43e7398d5472a7 (patch) | |
tree | 80f701e19e5f94686648cf7bc494f99fb74acc5d | |
parent | 83cbd87e2c13f8097e0624df061fc200ff96fcaa (diff) |
storage
-rw-r--r-- | storage.lua | 9 |
1 files changed, 8 insertions, 1 deletions
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 |