Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- local sides = {}
- if args[1] ~= nil then
- sides[1] = args[1]
- else
- sides = peripheral.getNames()
- end
- local only1Peripheral = args[1] ~= nil or #sides == 1
- for side in sides do
- if not only1Peripheral then
- print("Side " .. side .. ":")
- end
- for i, v in ipairs(peripheral.getMethods(side)) do
- local startChar
- if only1Peripheral then
- startChar = ""
- else
- startChar = "\t"
- end
- print(startChar .. i .. ": " .. v)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement