Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cube = peripheral.wrap("left")
- energy = cube.getEnergy()
- PrintCentered(energy .. " RF")
- function PrintCentered(sText)
- local w, h = term.getSize()
- local x, y = term.getCursorPos()
- x = math.max(math.floor((w / 2) - (#sText / 2)), 0)
- term.setCursorPos(x, y)
- print(sText)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement