skypop

api as peripheral

Oct 29th, 2016
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. setfenv(1,getfenv(2)) --fuck os.loadAPI()
  2.  
  3. local oper = {}
  4. for k,v in pairs(peripheral) do oper[k]=v end
  5.  
  6. peripheral.wrap = function(side)
  7.   if side=="lip/WI" then --ici
  8.     return lip.WorldInterface
  9.   end --etc..
  10.   return oper.wrap(side)
  11. end
  12.  
  13. peripheral.find = function(periph)
  14.   local pr = oper.find(periph)
  15.   if pr then return pr end
  16.   if periph=="WorldInterface" then
  17.     return lip.WorldInterface
  18.   end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment