Advertisement
Bendix

peripheral detect

Dec 9th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.23 KB | None | 0 0
  1. function detectDevice(DeviceName)
  2.   DeviceSide="nix"
  3.    for a,b in pairs(redstone.getSides()) do
  4.       if peripheral.getType(b)==DeviceName then
  5.          DeviceSide = b
  6.          break
  7.       end
  8.    end
  9.    return(DeviceSide)
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement