3 ms·
Can you elaborate on this?
by dbartolini 9y ago
Can you elaborate on this?
- andrewmcwatters 9y agohttp://lua-users.org/lists/lua-l/2012-08/msg00302.html http://lua-users.org/lists/lua-l/2012-08/msg00302.html
- dbartolini 9y agoAll resource paths (.lua files are resources like any other) in Crown are unix-style and do not include the extension. I have a custom loader that deals with it: https://github.com/dbartolini/crown/blob/master/src/lua/lua_environment.cpp#L52 https://github.com/dbartolini/crown/blob/master/src/lua/lua_...
- andrewmcwatters 9y agoI would recommend that you extend `package.loaders` instead. You risk breaking expected `require` functionality. Then you get the benefits of both!! https://www.lua.org/manual/5.1/manual.html#pdf-package.loaders https://www.lua.org/manual/5.1/manual.html#pdf-package.loade...
- dbartolini 9y agoI already do so: https://github.com/dbartolini/crown/blob/master/src/lua/lua_environment.cpp#L85 https://github.com/dbartolini/crown/blob/master/src/lua/lua_...
- andrewmcwatters 9y agoExample: https://github.com/Planimeter/grid-sdk/blob/master/engine/init.lua#L7 https://github.com/Planimeter/grid-sdk/blob/master/engine/in...