Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local c = require("component")
- local term = require("term")
- local shell = require("shell")
- local gpu = c.gpu
- local screenWidth, screenHeight = gpu.getResolution()
- local pt = {}
- local n = 0
- local flag = true
- local args, options = shell.parse(...)
- --------------------
- gpu.fill(1, 1, screenWidth, screenHeight, ' ')
- term.setCursor(1,1)
- if #args < 1 then
- print("filter default machine hull only")
- for k,v in c.list("hull") do
- n = n + 1
- print("======== ".."COUNTER "..n.." ========")
- print("adress: "..k.." ".."type: "..v)
- print("Input ".." ".." eu/t average in 5 ticks")
- print("Output ".." ".." eu/t average in 5 ticks")
- pt[n] = c.proxy(k)
- end
- else
- print("custom filter")
- for i = 1,#args do
- for k,v in c.list(tostring(args[i])) do
- n = n + 1
- print("======== ".."COUNTER "..n.." ========")
- print("adress: "..k.." ".."type: "..v)
- print("Input ".." ".." eu/t average in 5 ticks")
- print("Output ".." ".." eu/t average in 5 ticks")
- pt[n] = c.proxy(k)
- end
- end
- end
- while flag do
- for i=1,n do
- gpu.set(7,i*4," ")
- gpu.set(8,i*4+1," ")
- gpu.set(7,i*4,tostring(pt[i].getAverageElectricInput()))
- gpu.set(8,i*4+1,tostring(pt[i].getAverageElectricOutput()))
- end
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement