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
- --make random spaces go away
- 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 args = ...")
- h.writeLine([[local p = peripheral.wrap("]]..side..[[")]])
- h.writeLine("p."..v.."(args)")
- h.flush()
- end
- end
- end
Add Comment
Please, Sign In to add comment