Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local m = peripheral.wrap('monitor_0')
- local r = peripheral.wrap('BigReactors-Reactor_0')
- local oldTerm = term.redirect(m)
- term.redirect(m)
- m.setTextScale(1)
- m.setCursorPos(1, 1)
- m.setBackgroundColor(colors.black)
- m.clear()
- function draw()
- m.setCursorPos(5, 2)
- if(r.getActive()) then
- m.setTextColor(colors.green)
- print('ACTIVE')
- else
- m.setTextColor(colors.red)
- print('INACTIVE')
- end
- m.setTextColor(colors.white)
- m.setCursorPos(5, 4)
- print('ENERGY')
- energybar = (46 / 10000000) * r.getEnergyStored()
- m.setCursorPos(15, 4)
- print(math.ceil(energybar/0.46))
- paintutils.drawLine(5, 5, 46, 5, colors.gray)
- paintutils.drawLine(5, 5, energybar, 5, colors.green)
- m.setBackgroundColor(colors.black)
- m.setCursorPos(5, 7)
- print('FUEL')
- fuelbar = (46 / r.getFuelAmountMax()) * r.getFuelAmount()
- m.setCursorPos(15, 7)
- print(math.ceil(fuelbar/0.46))
- paintutils.drawLine(5, 8, 46, 8, colors.gray)
- paintutils.drawLine(5, 8, fuelbar , 8, colors.green)
- m.setBackgroundColor(colors.black)
- m.setCursorPos(5, 10)
- print('RF/TICK')
- m.setCursorPos(5, 11)
- print(r.getEnergyProducedLastTick())
- end
- while true do
- sleep(0)
- draw()
- end
- term.redirect(oldTerm)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement