Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local reactor = peripheral.wrap("BigReactors-Reactor_1")
- local mon = peripheral.wrap("monitor_0")
- -- clear the monitor at startup
- mon.clear()
- function repeats(s, n)
- return n > 0 and s .. repeats(s, n-1) or ""
- end
- function drawLine (m, row, color)
- local currentColor = m.getTextColor()
- local oldX, oldY = m.getCursorPos()
- local sizeX, sizeY = m.getSize()
- m.setCursorPos(row, 0)
- m.setTextColor(color)
- m.write(repeats(" ", sizeX))
- m.setCursorPos(oldX, oldY)
- m.setTextColor(currentColor)
- end
- function drawDisplay ()
- drawLine(mon, 1, colors.red)
- end
- drawDisplay()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement