Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local bridge = peripheral.wrap("left")
- bridge.clear()
- local event, command = os.pullEvent("chat_command")
- if (command == "displayAE") then
- local net = peripheral.wrap("back")
- local c = peripheral.wrap("appeng_me_tilecontroller_0")
- function cl()
- term.clear()
- term.setCursorPos(1,1)
- end
- local systems = {
- {
- ["id"] = "appeng_me_tilecontroller_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.8)
- value["itemstored"] = bridge.addText(5,14 + offset,"Items stored: ",0x333845)
- value["itemstored"].setScale(0.7)
- value["numitemsstored"] = bridge.addText(55,14 + offset,"",0xfbff00)
- value["numitemsstored"].setScale(0.7)
- offset = offset + 1
- end
- local system
- local table
- while true do
- for i=#systems,1,-1 do
- system = systems[i]
- table = c.provideCell()
- numItemsStored = table["storedItemCount"]
- term.clear()
- term.setCursorPos(1,1)
- print(tostring(numItemsStored).."/"..tostring(totalItems))
- totalItems = table["totalBytes"]
- system["numitemsstored"].setText(tostring(numItemsStored).."/"..tostring(totalItems))
- end
- os.sleep(2)
- 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)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement