Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arg = { ... }
- if #arg == 1 then
- subAspect = "Empty"
- subAspect = peripheral.call(arg[1],"getAspects")
- return
- end
- 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
- shell.run(shell.getRunningProgram(),device)
- jar = peripheral.wrap(device)
- aspect = subAspect
- count = jar.getAspectCount(aspect)
- if aspects[aspect] == nil then aspects[aspect] = count
- else aspects[aspect] = aspects[aspect] + count
- end
- end
- end
- print(textutils.serialize(aspects))
Advertisement
Add Comment
Please, Sign In to add comment