Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. local turbiny={}
  2.  
  3. local mon = peripheral.wrap("right")
  4.  
  5. function printTurbineInfo(turbine,pos)
  6. local rpm = turbine.getRotorSpeed()
  7. mon.setCursorPos(1,pos)
  8. print("Turbina "..pos..": "..rpm.." RPM")
  9. end
  10.  
  11. for i,v in pairs(peripheral.getNames()) do
  12. if string.lower(string.find(v,"bigreactors")) then
  13. turbiny[i] = peripheral.wrap(v)
  14. end
  15. if turbiny[i] then
  16. print("dodano turbine do tabeli "..v)
  17. else
  18. print("nie mozna dodac turbiny do tabeli "..v)
  19. end
  20. end
  21.  
  22. while true do
  23. sleep(1)
  24. mon.clear()
  25. for i,v in pairs(turbiny) do
  26. printTurbineInfo(v,i)
  27. print("Wyslano drukowanie turbiny "..i)
  28. end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement