Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component") --// just a tip. especially if running in the background,
- -- if you're not sharing this variable with other programs... localize it..
- local RF_BUFFER_MAX = 9000000
- local RF_BUFFER_MIN = 1000000
- local running = true -- set to false to kill the program
- while running do
- -- your code
- for _, reactor in pairs(REACTORS) do
- if reactor.getEnergyStored() >= RF_BUFFER_MAX then
- reactor.setActive(false)
- print("Reactor is offline")
- else if reactor.getEnergyStored() <=RF_BUFFER_MIN then
- reactor.setActive(true)
- print("Reactor is online")
- end
- end -- end for / end your code
- end -- end while
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement