Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local components = require("component")
- local reactor = components.reactor
- local cooldown = false
- local max = .95
- local min = .5
- reactor.setActive(true)
- while true do
- --find the deviation from maximum power
- local deviation = reactor.getEnergyStored() / 10000000
- if not cooldown && deviation >= max then
- cooldown = true
- reactor.setActive(false)
- end
- end
- if cooldown && deviation <= min then
- cooldown = false
- reactor.setActive(true)
- end
- end
Add Comment
Please, Sign In to add comment