Comparison

util/pluginloader.lua @ 11120:b2331f3dfeea

Merge 0.11->trunk
author Matthew Wild <mwild1@gmail.com>
date Wed, 30 Sep 2020 09:50:33 +0100
parent 10205:ff8de86b75f0
child 11129:387d442497e7
comparison
equal deleted inserted replaced
11119:68df52bf08d5 11120:b2331f3dfeea
34 return file, err; 34 return file, err;
35 end 35 end
36 36
37 local function load_resource(plugin, resource) 37 local function load_resource(plugin, resource)
38 resource = resource or "mod_"..plugin..".lua"; 38 resource = resource or "mod_"..plugin..".lua";
39 39 local lua_version = _VERSION:match(" (.+)$");
40 local names = { 40 local names = {
41 "mod_"..plugin..dir_sep..plugin..dir_sep..resource; -- mod_hello/hello/mod_hello.lua 41 "mod_"..plugin..dir_sep..plugin..dir_sep..resource; -- mod_hello/hello/mod_hello.lua
42 "mod_"..plugin..dir_sep..resource; -- mod_hello/mod_hello.lua 42 "mod_"..plugin..dir_sep..resource; -- mod_hello/mod_hello.lua
43 plugin..dir_sep..resource; -- hello/mod_hello.lua 43 plugin..dir_sep..resource; -- hello/mod_hello.lua
44 resource; -- mod_hello.lua 44 resource; -- mod_hello.lua
45 "share"..dir_sep.."lua"..dir_sep..lua_version..dir_sep.."mod_"..plugin..dir_sep..resource;
45 }; 46 };
46 47
47 return load_file(names); 48 return load_file(names);
48 end 49 end
49 50