Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- touchbar = peripheral.wrap("monitor_3")
- sec = peripheral.wrap("monitor_4")
- mon = peripheral.wrap("monitor_5")
- reactor = peripheral.wrap("BigReactors-Reactor_1")
- local on = true
- local reactor_on
- local reactor_capacity = 10000000
- local reactor_stored
- local energy_output
- local i = 0
- oldTerm = term.redirect(touchbar)
- term.clear()
- paintutils.drawPixel(0,0,colors.black)
- term.clear()
- term.redirect(oldTerm)
- oldTerm = term.redirect(mon)
- term.clear()
- paintutils.drawPixel(0,0,colors.black)
- term.clear()
- term.redirect(oldTerm)
- oldTerm = term.redirect(sec)
- term.clear()
- term.setCursorPos(1,1)
- textutils.slowPrint("--------------------------------------------")
- sleep(1)
- term.clear()
- term.redirect(oldTerm)
- parallel.waitForAny(draw_reactor_off,output)
- local function getReactorStats()
- reactor_on = reactor.getActive()
- energy_output = reactor.getEnergyProducedLastTick()
- reactor_stored = reactor.getEnergyStored()
- end
- local function output()
- while i == 0 do
- sec.clear()
- getReactorStats()
- sec.write(energy_output.."RF/Tick")
- end
- end
- local function draw_reactor_off()
- oldTerm = term.redirect(mon)
- paintutils.drawPixel(0,0,colors.black)
- term.clear()
- paintutils.drawBox(31,3,48,17,colors.gray)
- paintutils.drawFilledBox(33,5,37,15,colors.gray)
- paintutils.drawFilledBox(42,5,46,15,colors.gray)
- paintutils.drawLine(39,4,39,16,colors.gray)
- paintutils.drawLine(40,4,40,16,colors.gray)
- term.redirect(oldTerm)
- end
- local function draw_reactor_on()
- oldTerm = term.redirect(mon)
- paintutils.drawPixel(0,0,colors.black)
- term.clear()
- paintutils.drawBox(31,3,48,17,colors.white)
- paintutils.drawFilledBox(33,5,37,15,colors.blue)
- paintutils.drawFilledBox(42,5,46,15,colors.blue)
- paintutils.drawLine(39,4,39,16,colors.yellow)
- paintutils.drawLine(40,4,40,16,colors.yellow)
- y2 = reactor.getFuelAmount()/reactor.getFuelAmountMax()
- if y2 <= 1 and y2 >= 0.95 then
- sleep(1)
- elseif y2 <= 0.1 then
- paintutils.drawLine(39,4,39,16,colors.red)
- paintutils.drawLine(40,4,40,16,colors.red)
- else
- y2 = y2 * 12 + 4
- paintutils.drawLine(39,4,39,y2,colors.red)
- paintutils.drawLine(40,4,40,y2,colors.red)
- end
- term.redirect(oldTerm)
- end
Advertisement
Add Comment
Please, Sign In to add comment