Dojnaz

CC ME Viewer

Dec 19th, 2020 (edited)
647
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local meTerminal = peripheral.wrap("left")
  2. local mon = peripheral.wrap("right")
  3.  
  4. --Don't change anything below this line
  5. local items
  6. local encoded
  7.  
  8. if (not fs.exists("json")) then
  9.     shell.run("pastebin", "get", "4nRg9CHU", "json")
  10. end
  11. os.loadAPI("json")
  12.  
  13. encoded = {}
  14. items = meTerminal.getAvailableItems()
  15. for v in pairs(items) do
  16.     mon.setCursorPos(1,v)
  17.     mon.write(json.encode(items[v]))
  18.     print(json.encode(items[v]))
  19.     encoded[v] = json.encode(items[v])
  20. end
  21.  
  22. print("[" .. table.concat(encoded, ",") .. "]")
  23.  
Add Comment
Please, Sign In to add comment