SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local test = peripheral.isPresent("bottom")
|
| 1 | + | local peripheralSide = "left" |
| 2 | - | local mon = peripheral.wrap("right")
|
| 2 | + | local file = fs.open("Function List.txt", "w")
|
| 3 | function monitorSearch() | |
| 4 | local names = peripheral.getNames() | |
| 5 | local i, name | |
| 6 | for i, name in pairs(names) do | |
| 7 | if peripheral.getType(name) == "monitor" then | |
| 8 | - | mon.setTextScale(1) |
| 8 | + | test = name |
| 9 | - | for i,v in ipairs(peripheral.getMethods("bottom"))
|
| 9 | + | return peripheral.wrap(name) |
| 10 | else | |
| 11 | --return nil | |
| 12 | end | |
| 13 | - | end |
| 13 | + | end |
| 14 | end | |
| 15 | local mon = monitorSearch() | |
| 16 | local test = peripheral.isPresent(peripheralSide) | |
| 17 | local x = 1 | |
| 18 | local y = 1 | |
| 19 | mon.write(test) | |
| 20 | mon.clear() | |
| 21 | mon.setCursorPos(x,y) | |
| 22 | for i,v in ipairs(peripheral.getMethods(peripheralSide)) | |
| 23 | do mon.write(i..". "..v) | |
| 24 | file.writeLine(i..". "..v.."()") | |
| 25 | y = y + 1 | |
| 26 | mon.setCursorPos(x,y) | |
| 27 | end | |
| 28 | y = y + 1 | |
| 29 | mon.write(peripheral.getType(peripheralSide)) | |
| 30 | file.close() |