Advertisement
icaruscoil

BR get turbine name

Jun 1st, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. function turbineSearch()
  2.    local names = peripheral.getNames()
  3.    local i, name
  4.    for i, name in pairs(names) do
  5.       if peripheral.getType(name) == "BigReactors-Reactor" then
  6.          return peripheral.wrap(name)
  7.       else
  8.          print ("No Turbine Found!")
  9.       end
  10.    end
  11. end
  12.  
  13. turbineWrap = turbineSearch()
  14. local turbineName = peripheral.getType(turbineWrap)
  15.  
  16. print ("Wrapped Turbine: " ..turbineName)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement