Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local bridge = peripheral.wrap("left")
- local net = peripheral.wrap("back")
- local c = peripheral.wrap("me_controller_0")
- function cl()
- term.clear()
- term.setCursorPos(1,1)
- end
- local systems = {
- {
- ["id"] = "me_controller_0",
- ["label"] = "AE System"
- }
- }
- local width = 50
- local offset,pxOffset = 0,0
- h = fs.open("methods", "w")
- local methods = textutils.serialize(c.provideCell())
- h.write(methods)
- h.close()
- bridge.clear()
- for key,value in pairs(systems) do
- pxOffset = offset * 20
- value["title"] = bridge.addText(5,5 + offset,value["label"],0xC5360F)
- value["title"].setScale(0.7)
- value["itemstored"] = bridge.addText(5,10 + offset,"Items stored: ",0xADAD28)
- value["itemstored"].setScale(0.6)
- value["numitemsstored"] = bridge.addText(72,10 + offset,"",0xBABAA6)
- value["numitemsstored"].setScale(0.6)
- offset = offset + 1
- end
- local system
- local table = c.provideCell()
- while true do
- for i=#systems,1,-1 do
- system = systems[i]
- numItemsStored = table["storedItemCount"]
- system["numitemsstored"].setText(tostring(numItemsStored))
- end
- os.sleep(1)
- end
- cl()
- print("Free Bytes: "..table["freeBytes"])
- read()
- -- arguments: x, y, width, height, color, opacity
- -- mybox = bridge.addBox(0,0,80,40,0x0099FF,0.7)
- -- arguments: x, y, text, color
- -- mytext = bridge.addText(10, 10, "hello!", 0xCC0000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement