Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("running reactor")
- reactor = peripheral.wrap("BigReactors-Reactor_8")
- cell1 = peripheral.wrap("cofh_thermalexpansion_energycell_21")
- cell2 = peripheral.wrap("cofh_thermalexpansion_energycell_20")
- cell3 = peripheral.wrap("cofh_thermalexpansion_energycell_19")
- cell4 = peripheral.wrap("cofh_thermalexpansion_energycell_18")
- cell5 = peripheral.wrap("cofh_thermalexpansion_energycell_17")
- monitor = peripheral.wrap("right")
- monitor.clear()
- monitor.setCursorPos(1,1)
- monitor.write("Current Energy Stored:")
- monitor.setCursorPos(1,2)
- monitor.write("Reactor Status:")
- monitor.setCursorPos(1,3)
- monitor.write("Fuel Status(mb):")
- monitor.setCursorPos(1,4)
- monitor.write("Redstone Flux Per Tick:")
- monitor.setCursorPos(23,1)
- while true do
- totalEnergy = cell1.getEnergyStored("east") + cell2.getEnergyStored("east") + cell3.getEnergyStored("east") + cell4.getEnergyStored("east") + cell5.getEnergyStored("east")
- monitor.setCursorPos(23,1)
- monitor.write(tostring(totalEnergy))
- sleep(.5)
- monitor.setCursorPos(17,3)
- monitor.write(reactor.getFuelAmount())
- monitor.setCursorPos(24,4)
- monitor.write(tostring(reactor.getEnergyProducedLastTick()))
- if(totalEnergy <=50000000)then
- reactor.setActive(true)
- end
- if(totalEnergy >= 240000000)then
- reactor.setActive(false)
- end
- if(reactor.getActive()) then
- monitor.setCursorPos(16,2)
- monitor.write("Active ")
- else
- monitor.setCursorPos(16,2)
- monitor.write("Inactive")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement