Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sides = {}
- side = ""
- type = ""
- function readTab(t)
- for i,v in pairs(t) do
- print(i,": ",v)
- end
- end
- --if not in sides then delete the directory
- --run code from directory directly
- --
- for _,v in pairs(peripheral.getNames()) do
- if v then
- side = v
- type = peripheral.getType(v)
- fs.makeDir(type)
- for i,v in pairs(peripheral.getMethods(v)) do
- local fileName = i
- local methodData = v
- local h = fs.open(type.."/"..v,"w")
- h.writeLine("--"..type)
- h.writeLine("local tArgs = {...}")
- h.writeLine([[local p = peripheral.wrap("]]..side..[[")]])
- h.writeLine("p."..v.."(table.concat(tArgs,\" \"))")
- h.close()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement