Guest User

Untitled

a guest
Dec 29th, 2013
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. modem = peripheral.wrap("back")
  2. aspects = {}
  3. devices = peripheral.getNames()
  4. for i, device in pairs(devices) do
  5. if peripheral.getType( device ) == "tt_transvectorinterface" and peripheral.call(device,"isAspectContainer") then
  6. jar = peripheral.wrap(device)
  7. aspect = jar.getAspects()
  8. if aspect then
  9. count = jar.getAspectCount(aspect)
  10. if aspects[aspect] == nil then aspects[aspect] = count
  11. else aspects[aspect] = aspects[aspect] + count
  12. end
  13. end
  14. end
  15. end
  16. print(textutils.serialize(aspects))
Advertisement
Add Comment
Please, Sign In to add comment