Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require('component')
- -- создаем таблички для хранения адресов компонентов
- local gpu = {}
- local screen = {}
- -- получаем список видеокарт
- for address, componentType in component.list("gpu") do
- table.insert(gpu, address)
- end
- -- получаем список мониторов
- for address, componentType in component.list("screen") do
- table.insert(screen, address)
- end
- -- Биндим попарно
- -- (количество мониторов и карт должно быть одинаковое)
- for number, address in pairs(gpu) do
- component.proxy(address).bind(screen[number])
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement