Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function activate()
- local reactor = peripheral.wrap("<Put Reactor name here>")
- reactor.setActive(true)
- end
- function deactivate()
- local reactor = peripheral.wrap("<Put Reactor name here>")
- reactor.setActive(false)
- end
- function reactorControl()
- local reactor = peripheral.wrap("<Put Reactor name here>")
- local currentRfStored = reactor.getEnergyStored(w)
- if currentRfStored <= 5000000 then activate()
- end
- if currentRfStored >= 8000000 then deactivate()
- end
- end
- while true do
- local reactor1 = peripheral.wrap("<Put Reactor name here>")
- local mon = peripheral.wrap("<Put Monitor name here>")
- mon.clear()
- -- Begin Reactor 1
- --mon.setCursorPos(1,1)
- --mon.setTextColor(colors.white)
- --mon.write("Reactor #: ")
- --mon.setTextColor(colors.lime)
- --mon.write("1")
- mon.setCursorPos(1,1)
- mon.setTextColor(colors.white)
- mon.write("Active: ")
- mon.setTextColor(colors.lime)
- mon.write(reactor1.getActive())
- mon.setCursorPos(1,2)
- mon.setTextColor(colors.white)
- mon.write("RF/T: ")
- mon.setTextColor(colors.lime)
- mon.write(math.floor(reactor1.getEnergyProducedLastTick()))
- mon.setCursorPos(1,3)
- mon.setTextColor(colors.white)
- mon.write("RF Stored: ")
- mon.setTextColor(colors.lime)
- mon.write(math.floor(reactor1.getEnergyStored()))
- mon.setCursorPos(1,4)
- mon.setTextColor(colors.white)
- mon.write("Casing Heat: ")
- mon.setTextColor(colors.lime)
- mon.write(math.floor(reactor1.getCasingTemperature()))
- mon.setCursorPos(1,5)
- mon.setTextColor(colors.white)
- mon.write("Fuel Heat: ")
- mon.setTextColor(colors.lime)
- mon.write(math.floor(reactor1.getFuelTemperature()))
- -- End Reactor 1
- reactorControl()
- sleep(2)
- end
Add Comment
Please, Sign In to add comment