diff options
author | ubq323 <ubq323@ubq323.website> | 2022-08-04 14:37:35 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-08-04 14:37:35 +0100 |
commit | 83cbd87e2c13f8097e0624df061fc200ff96fcaa (patch) | |
tree | a4df29800d3f2bcb9bfc2fc87bce14eda35fea56 /storage.lua | |
parent | 48b51b501e013b11145c3a1eb28c58ec6c0d49b1 (diff) |
storage
Diffstat (limited to 'storage.lua')
-rw-r--r-- | storage.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/storage.lua b/storage.lua new file mode 100644 index 0000000..5128acd --- /dev/null +++ b/storage.lua @@ -0,0 +1,17 @@ +local M = peripheral.find"monitor" + +local sides = {} +for _,s in ipairs(redstone.getSides()) do sides[s] = true end + +local chest_types = { + "minecraft:ironchest_diamond", + "minecraft:ironchest_iron", +} + +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 +end +return chests |