Advertisement
Archchancellor64

Testing

Dec 4th, 2020 (edited)
919
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. interface = peripheral.wrap("right")
  2. screen = peripheral.wrap("left")
  3. term.redirect(screen)
  4.  
  5. function toString(object)
  6.     if type(object) == "table" then
  7.         output = "{"
  8.         for key, value in pairs(object) do
  9.             output = output .. key .. ":" .. toString(value)
  10.         end
  11.         return output .. "}"
  12.     else if type(object) == "string" then
  13.         return object
  14.     else if type(object) == "bool" then
  15.         if object then
  16.             return "true"
  17.         else
  18.             return "false"
  19.         end
  20.     end
  21. end
  22.  
  23. CPUs = interface.getCraftingCPUs()
  24. print(toString(CPUs))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement