Advertisement
melzneni

AnalyseSides

Jun 9th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. sides={"left","right","top","bottom","front","back"}
  2.  
  3. for i,side in ipairs(sides) do
  4.    
  5.     if peripheral.isPresent(side) then
  6.         print("side: "..side)
  7.         print("\ttype = "..peripheral.getType(side))
  8.         print("\tmethods:")
  9.         methods=""
  10.         for i,method in ipairs(peripheral.getMethods(side)) do
  11.             if i>0 then
  12.                 methods=methods..", "
  13.             end
  14.             methods=methods..method
  15.         end
  16.         print(methods)
  17.  
  18.     end
  19.    
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement