Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function peripheral.wrap(direction)
- if not peripheral.isPresent(direction) then return end
- local self = setmetatable({}, {__index = peripheral})
- for _, method in pairs(peripheral.getMethods(direction)) do
- self[method] = function(...)
- return peripheral.call(direction, method, ...)
- end
- end
- return self
- end
- local monitor = peripheral.wrap("right")
- local sx, sy = monitor.getSize()
- monitor.setPaletteColor(1, 114/255, 137/255, 218/255)
- monitor.drawFilledBox(1, 1, sx, sy, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement