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 = reactor.getActive() and colors.green or colors.red
- local activeText = reactor.getActive() and "active" or "inactive"
- mon.setCursorPos(1, 1)
- mon.write("reactor: ")
- mon.setTextColor(activeColor)
- mon.write(activeText)
- mon.setTextColor(colors.white)
- -- stored energy
- mon.setCursorPos(1, 2)
- mon.write("buffer: " .. math.floor(reactor.getEnergyStored()))
- -- energy / tick
- mon.setCursorPos(1, 3)
- mon.write("energy/tick:")
- mon.setCursorPos(1, 4)
- mon.write("-> " .. math.floor(reactor.getEnergyProducedLastTick()))
- -- temperature
- mon.setCursorPos(1, 8)
- mon.write("temp casing/fuel:")
- mon.setCursorPos(1, 9)
- mon.write("-> " .. math.floor(reactor.getCasingTemperature()) .. " / " .. math.floor(reactor.getFuelTemperature()))
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement