Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Script for automatically maintaining
- -- Control Rod states for a big reactor
- -- Always place computer with the back to the reactor computer port, or modify this value.
- reactor = peripheral.wrap( "back" )
- reactorMaxPower = reactor.getEnergyCapacity()
- while true do
- reactorCurrentPower = reactor.getEnergyStored()
- -- The percentage of our internal power buffer
- loadPercentage = ( reactorCurrentPower / reactorMaxPower ) * 100
- -- The internal buffer percentage represents the insertion rate
- -- of our Control Rods
- reactor.setAllControlRodLevels( loadPercentage )
- -- Wait a given amount of time before we
- -- check the value again
- os.sleep( 10 )
- end
Add Comment
Please, Sign In to add comment