Happymonkey4

CCTest Aread

Jan 19th, 2021 (edited)
694
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. currentE = -1
  2. while true do
  3.     -- all the cubes
  4.     local cube0 = peripheral.wrap("mekanism:basic_energy_cube_0")
  5.     local mon = peripheral.wrap("top")
  6.     mon.clear()
  7.     -- cube 0
  8.     cubeE = cube0.getEnergy()
  9.     if cubeE > currentE then
  10.         mon.setCursorPos(1,1)
  11.         mon.setTextColor(colors.white)
  12.         mon.write("CUBE 1: ")
  13.         mon.setTextColor(colors.green)
  14.         mon.write(string.format("%.2f %%",math.floor(cubeE/1000000)))
  15.         mon.setTextColor(colors.white)
  16.         mon.write(" MRF/t")
  17.     elseif cubeE < currentE then
  18.         mon.setCursorPos(1,1)
  19.         mon.setTextColor(colors.white)
  20.         mon.write("CUBE 1: ")
  21.         mon.setTextColor(colors.green)
  22.         mon.write(string.format("%.2f %%",math.floor(cubeE/1000000)))
  23.         mon.setTextColor(colors.white)
  24.         mon.write(" MRF/t")
  25.     end
  26.  
  27.     sleep(5)
  28. end
  29.  
Add Comment
Please, Sign In to add comment