Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- component = require("component")
- term = require("term")
- c = component.gt_machine
- component.gpu.setResolution(4,1)
- while true do
- os.sleep(0.25)
- p = tonumber(c.getWorkProgress())
- pm = tonumber(c.getWorkMaxProgress())
- pc = math.floor(((p / pm) * 100) + 0.5)
- term.clear()
- term.setCursor(1,1)
- if pm == 0 then
- term.setCursor(1,1)
- term.write("Done")
- else
- term.write(pc.."%")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement