Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. reactor = peripheral.wrap("BigReactors-Reactor_1")
  2. mon = peripheral.wrap("monitor_0")
  3.  
  4. while true do
  5.   -- reset everything
  6.   mon.clear()
  7.   mon.setBackgroundColor(colors.black)
  8.   mon.setTextColor(colors.white)
  9.  
  10.  
  11.   -- active state:
  12.   local activeColor = if reactor.getActive() then colors.green else colors.red end
  13.   local activeText = if reactor.getActive() then "active" else "inactive" end
  14.  
  15.   mon.setCursorPos(1, 1)
  16.   mon.write("reactor: ")
  17.   mon.setTextColor(activeColor)
  18.   mon.write(activeText)
  19.  
  20.   sleep(5)
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement