Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- reactor = peripheral.wrap("BigReactors-Reactor_1")
- mon = peripheral.wrap("monitor_0")
- while true do
- -- reset everything
- mon.clear()
- mon.setBackgroundColor(colors.black)
- mon.setTextColor(colors.white)
- -- active state:
- local activeColor = if reactor.getActive() then colors.green else colors.red end
- local activeText = if reactor.getActive() then "active" else "inactive" end
- mon.setCursorPos(1, 1)
- mon.write("reactor: ")
- mon.setTextColor(activeColor)
- mon.write(activeText)
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement