Changeset

4183:d899a847867e

util.pluginloader: Remove unused support for custom loaders, to simplify further refactoring.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 20 Feb 2011 20:11:52 +0500
parents 4182:f71e66702665
children 4184:7e3a570f33f4
files util/pluginloader.lua
diffstat 1 files changed, 5 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/util/pluginloader.lua	Sun Feb 20 20:06:38 2011 +0500
+++ b/util/pluginloader.lua	Sun Feb 20 20:11:52 2011 +0500
@@ -32,28 +32,24 @@
 	return content, path;
 end
 
-function load_resource(plugin, resource, loader)
+function load_resource(plugin, resource)
 	local path, name = plugin:match("([^/]*)/?(.*)");
 	if name == "" then
 		if not resource then
 			resource = "mod_"..plugin..".lua";
 		end
-		loader = loader or load_file;
 
-		local content, err = loader(plugin.."/"..resource);
-		if not content then content, err = loader(resource); end
-		-- TODO add support for packed plugins
+		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
-		loader = loader or load_file;
 
-		local content, err = loader(plugin.."/"..resource);
-		if not content then content, err = loader(path.."/"..resource); end
-		-- TODO add support for packed plugins
+		local content, err = load_file(plugin.."/"..resource);
+		if not content then content, err = load_file(path.."/"..resource); end
 		
 		return content, err;
 	end