SirSheepe

kek

May 18th, 2018
113
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. function peripheral.wrap(direction)
  3.     if not peripheral.isPresent(direction) then return end
  4.     local self = setmetatable({}, {__index = peripheral})
  5.  
  6.     for _, method in pairs(peripheral.getMethods(direction)) do
  7.         self[method] = function(...)
  8.             return peripheral.call(direction, method, ...)
  9.         end
  10.     end
  11.  
  12.     return self
  13. end
  14.  
  15. local monitor = peripheral.wrap("right")
  16. local sx, sy = monitor.getSize()
  17.  
  18. monitor.setPaletteColor(1, 114/255, 137/255, 218/255)
  19. monitor.drawFilledBox(1, 1, sx, sy, 1)
RAW Paste Data