Advertisement
edoreld

Untitled

Jun 7th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. local bridge = peripheral.wrap("left")
  2. local net = peripheral.wrap("back")
  3. local c = peripheral.wrap("me_controller_0")
  4.  
  5. function cl()
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. end
  9.  
  10. local systems = {
  11. {
  12. ["id"] = "me_controller_0",
  13. ["label"] = "AE System"
  14. }
  15. }
  16.  
  17. local width = 50
  18. local offset,pxOffset = 0,0
  19.  
  20. h = fs.open("methods", "w")
  21. local methods = textutils.serialize(c.provideCell())
  22. h.write(methods)
  23. h.close()
  24.  
  25. bridge.clear()
  26.  
  27. for key,value in pairs(systems) do
  28. pxOffset = offset * 20
  29.  
  30. value["title"] = bridge.addText(5,5 + offset,value["label"],0xC5360F)
  31. value["title"].setScale(0.7)
  32. value["itemstored"] = bridge.addText(5,10 + offset,"Items stored: ",0xADAD28)
  33. value["itemstored"].setScale(0.6)
  34. value["numitemsstored"] = bridge.addText(72,10 + offset,"",0xBABAA6)
  35. value["numitemsstored"].setScale(0.6)
  36.  
  37. offset = offset + 1
  38. end
  39.  
  40. local system
  41. local table = c.provideCell()
  42.  
  43. while true do
  44. for i=#systems,1,-1 do
  45. system = systems[i]
  46. numItemsStored = table["storedItemCount"]
  47. system["numitemsstored"].setText(tostring(numItemsStored))
  48. end
  49.  
  50. os.sleep(1)
  51. end
  52.  
  53. cl()
  54.  
  55.  
  56.  
  57. print("Free Bytes: "..table["freeBytes"])
  58. read()
  59.  
  60. -- arguments: x, y, width, height, color, opacity
  61. -- mybox = bridge.addBox(0,0,80,40,0x0099FF,0.7)
  62.  
  63. -- arguments: x, y, text, color
  64. -- mytext = bridge.addText(10, 10, "hello!", 0xCC0000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement