Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cell=peripheral.wrap("tile_thermalexpansion_cell_reinforced_name_0")
- local reactor=peripheral.wrap("BigReactors-Reactor_0")
- local maxEnergy=cell.getMaxEnergyStored("north")
- function handleReactor()
- local energy=cell.getEnergyStored("north")
- print(energy.."/"..maxEnergy)
- if energy>=maxEnergy*0.8 then
- reactor.setActive(false)
- elseif energy<=maxEnergy*0.3 then
- reactor.setActive(true)
- end
- end
- while true do
- handleReactor()
- sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement