Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------reactor to update :P------------
- local b = require("button")
- local r = peripheral.wrap("BigReactors-Reactor_0")
- local m = peripheral.wrap("right")
- local me = peripheral.wrap("top")
- m.clear()
- me.clear()
- me.setTextScale(0.5)
- local function update()
- local click = b.timetouch(1, "right")
- b.sliderVer("right", click, 1, 2, 11, 10, "white", "black")
- b.switchn("right", 1, click, 4, 2, "red", "green", "white", "off", "on")
- local slider = b.sliderVer("db", 1) * 10 - 10
- r.setAllControlRodLevels(slider)
- m.setCursorPos(3, 5)
- if slider > 0 then
- m.write(slider)
- end
- r.setActive(b.switchn("db", 1))
- b.bar("top",3,4,20,2,r.getEnergyStats().energyStored,10000000,"gray","red","white",true,false,"energy",true,true,false)
- me.setCursorPos(4, 8)
- me.clearLine()
- me.write(math.floor(r.getEnergyProducedLastTick() * 10) .. " RF/s")
- end
- while true do
- if r.getEnergyStored() >= 9999999 then
- b.switchn("setdb", 1, false)
- repeat
- update()
- until r.getEnergyStored() < 10000000
- b.switchn("setdb", 1, true)
- end
- update()
- end
Add Comment
Please, Sign In to add comment