- local content, err = load_file(plugin.."/"..resource);
- if not content then content, err = load_file(resource); end
-
- return content, err;
- else
- if not resource then
- resource = "mod_"..name..".lua";
- end
+ local names = {
+ "mod_"..plugin.."/"..plugin.."/"..resource; -- mod_hello/hello/mod_hello.lua
+ "mod_"..plugin.."/"..resource; -- mod_hello/mod_hello.lua
+ plugin.."/"..resource; -- hello/mod_hello.lua
+ resource; -- mod_hello.lua
+ };