Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modem = peripheral.wrap("back")
- aspects = {}
- devices = peripheral.getNames()
- for i, device in pairs(devices) do
- if peripheral.getType( device ) == "tt_transvectorinterface" and peripheral.call(device,"isAspectContainer") then
- jar = peripheral.wrap(device)
- aspect = jar.getAspects()
- if aspect then
- count = jar.getAspectCount(aspect)
- if aspects[aspect] == nil then aspects[aspect] = count
- else aspects[aspect] = aspects[aspect] + count
- end
- end
- end
- end
- print(textutils.serialize(aspects))
Advertisement
Add Comment
Please, Sign In to add comment