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.getBackgroundColor()
- local currentPos = m.getCursorPos()
- m.setCursorPos(row, 0)
- m.setBackgroundColor(color)
- m.write(repeats(" ", m.getSize().x)
- m.setCursorPos(currentPos.x, currentPos.y)
- m.setBackgroundColor(currentColor)
- end
- function drawDisplay ()
- drawLine(mon, 1, colors.red)
- end
- drawDisplay()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement