Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local reactor1 = peripheral.wrap("BigReactors-Reactor_0")
- local cell1 = peripheral.wrap("powered_tile_0")
- local mon1 = peripheral.wrap("monitor_0")
- local low = 8000000
- local high = 9900000
- mon1.clear()
- --Begin query
- --Reactor 1 - ME Reactor
- if cell1.getEnergyStored() <= low then
- reactor1.setActive(true)
- end
- if cell1.getEnergyStored() >= high then
- reactor1.setActive(false)
- end
- mon1.setCursorPos(1,1)
- mon1.setTextColor(colors.red)
- mon1.write("ME Reactor")
- mon1.setCursorPos(1,2)
- mon1.setTextColor(colors.white)
- mon1.write("Active: ")
- mon1.setTextColor(colors.lime)
- mon1.write(reactor1.getActive())
- mon1.setCursorPos(1,3)
- mon1.setTextColor(colors.white)
- mon1.write("RF/T: ")
- mon1.setTextColor(colors.lime)
- mon1.write((math.floor(reactor1.getEnergyProducedLastTick())) / 1000000)
- mon1.setCursorPos(1,4)
- mon1.setTextColor(colors.white)
- mon1.write("RF Stored: ")
- mon1.setTextColor(colors.lime)
- mon1.write((math.floor(reactor1.getEnergyStored())) / 1000000)
- mon1.setCursorPos(1,5)
- mon1.setTextColor(colors.red)
- mon1.write("Cell 1")
- mon1.setCursorPos(1,6)
- mon1.setTextColor(colors.white)
- mon1.write("RF: ")
- mon1.setTextColor(colors.lime)
- mon1.write((math.floor(cell1.getEnergyStored())) / 1000000)
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement