Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --LibraryHelpInjector © SergOmarov, 2015
- local lib=function(helpFile,targetLibrary)
- local newLib={}
- local help=dofile(helpFile)
- local funcMeta=setmetatable({__call=function(o,...) return o.f(...)end,__tostring=function(o)return o.h end,__newindex=function()error("this is function")end,__index=function()error("this is function")end})
- for k,i in pairs(help) do
- newLib[k]=setmetatable({f=targetLibrary[k],h=i},funcMeta)
- end
- return newLib
- end
- return lib
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement