Posted 15 November 2018 - 07:55 AM
Just a simple program I threw together to store all the methods of a peripheral in a file, was trying to view ic2 nuclear reactor methods but it filled my screen and I couldnt see them all, so I decided to store all the methods of every peripheral on the computers network into a scroll-able file. Enjoy!
http://pastebin.com/qGiXZrTc
pastebin get qGiXZrTc
http://pastebin.com/qGiXZrTc
Spoiler
--Simple Program to list Methods for Peripheral's
print("Making a file for each peripheral currently available")
directory ="methods/" --directory where files will be stored
if fs.isDir(directory) then fs.delete(directory) end
fs.makeDir(directory)
for i,v in pairs(peripheral.getNames()) do
local file = peripheral.getType(v)
local h = fs.open(file, "w")
h.writeLine("--PeripheralType:")
h.writeLine(peripheral.getType(v))
h.writeLine()
h.writeLine("--PeripheralName:")
h.writeLine(v)
h.writeLine()
h.writeLine("--Methods:")
local methods = peripheral.getMethods(v)
table.sort(methods)
for o,b in pairs(methods) do
h.writeLine(B)/>/>
end
h.writeLine()
h.writeLine()
h.writeLine("---End Of File---")
h.close()
fs.move(file,directory..file)
end