Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cube = peripheral.wrap("back")
- mon = peripheral.wrap("top")
- mon.clear()
- mon.setBackgroundColor(colors.blue)
- while true do
- energy = cube.getEnergyStored() / 2500000
- cap = cube.getMaxEnergy() / 2500000
- capacity = cube.getMaxEnergy() / 2500000000000
- ene = string.sub(energy/1000,0,7)
- mon.setCursorPos(1,1)
- mon.clearLine()
- mon.write("Energy stored: " .. ene .. "GRF")
- mon.setCursorPos(1,2)
- mon.clearLine()
- mon.write("Capacity: " .. capacity .. "TRF")
- mon.setCursorPos(1,3)
- mon.clearLine()
- percent = energy/cap*100
- mon.write("Percent: " .. string.sub(percent,0,5) .. "%")
- mon.setCursorPos(1,4)
- mon.clearLine()
- mon.write("Input: " .. cube.getLastInput()/2500 .. "KRF")
- mon.setCursorPos(1,5)
- mon.clearLine()
- mon.write("Output: " .. cube.getLastOutput()/2500 .. "KRF")
- sleep(0.45)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement