Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 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.   -- active state:
  11.   local activeColor = reactor.getActive() and colors.green or colors.red
  12.   local activeText = reactor.getActive() and "active" or "inactive"
  13.  
  14.   mon.setCursorPos(1, 1)
  15.   mon.write("reactor: ")
  16.   mon.setTextColor(activeColor)
  17.   mon.write(activeText)
  18.   mon.setTextColor(colors.white)
  19.  
  20.    -- stored energy
  21.    mon.setCursorPos(1, 2)
  22.    mon.write("buffer: " .. math.floor(reactor.getEnergyStored()))
  23.  
  24.   -- energy / tick
  25.   mon.setCursorPos(1, 3)
  26.   mon.write("energy/tick:")
  27.   mon.setCursorPos(1, 4)
  28.   mon.write("-> " .. math.floor(reactor.getEnergyProducedLastTick()))
  29.  
  30.   -- temperature
  31.   mon.setCursorPos(1, 8)
  32.   mon.write("temp casing/fuel:")
  33.   mon.setCursorPos(1, 9)
  34.   mon.write("-> " .. math.floor(reactor.getCasingTemperature()) .. " / " .. math.floor(reactor.getFuelTemperature()))
  35.  
  36.   sleep(5)
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement