Changeset

10205:ff8de86b75f0

util.pluginloader: Added a new path to the variable local_names
author João Duarte <jvsDuarte08@gmail.com>
date Fri, 16 Aug 2019 13:54:40 -0700
parents 10204:fbd4a5bc3a01
children 10206:46a5f2bf5ee0
files util/pluginloader.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/pluginloader.lua	Fri Aug 16 10:44:10 2019 -0700
+++ b/util/pluginloader.lua	Fri Aug 16 13:54:40 2019 -0700
@@ -36,12 +36,13 @@
 
 local function load_resource(plugin, resource)
 	resource = resource or "mod_"..plugin..".lua";
-
+	local lua_version = _VERSION:match(" (.+)$");
 	local names = {
 		"mod_"..plugin..dir_sep..plugin..dir_sep..resource; -- mod_hello/hello/mod_hello.lua
 		"mod_"..plugin..dir_sep..resource;                  -- mod_hello/mod_hello.lua
 		plugin..dir_sep..resource;                          -- hello/mod_hello.lua
 		resource;                                           -- mod_hello.lua
+		"share"..dir_sep.."lua"..dir_sep..lua_version..dir_sep.."mod_"..plugin..dir_sep..resource;
 	};
 
 	return load_file(names);