summaryrefslogtreecommitdiff
path: root/storage.lua
blob: 5128acd2e4b647b0614113cce6fe53beaca0ed8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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