Advertisement
Xylem_Gaming

Turbine Controller

Mar 17th, 2016
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. tur = peripheral.wrap("BigReactors-Turbine_0")
  2. rec = peripheral.wrap("BigReactors-Reactor_0")
  3. mon = peripheral.wrap("top")
  4.  
  5. maxe = 1000000
  6.  
  7. while true do
  8.     eng = tur.getEnergyStored()
  9.     tick = tur.getEnergyProducedLastTick()
  10.     act = tur.getActive()
  11.     rpm = tur.getRotorSpeed()
  12.     if act then
  13.         act = "Online"
  14.     elseif act == false then
  15.         act = "Offline"
  16.     end
  17.  
  18.     mon.clear()
  19.     mon.setCursorPos(1,1)
  20.     mon.write("TURBINE STATUS: "..act)
  21.     mon.setCursorPos(1,3)
  22.     mon.write("RPM: "..rpm)
  23.     mon.setCursorPos(1,5)
  24.     mon.write("Tick Rate: "..tick)
  25.     mon.setCursorPos(1,7)
  26.     mon.write("Energy Stored: "..eng.."/"..maxe)
  27.     sleep(1)
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement