diff --git a/scripts/eressea/init.lua b/scripts/eressea/init.lua index a5947dc50..184120850 100644 --- a/scripts/eressea/init.lua +++ b/scripts/eressea/init.lua @@ -1,10 +1,4 @@ -if config.paths ~= nil then - for path in string.gmatch(config.paths, "([^:]+)") do - package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua' - end -end -print(package.path) - +require 'eressea.path' require 'eressea.resources' require 'eressea.spells' diff --git a/scripts/eressea/path.lua b/scripts/eressea/path.lua new file mode 100644 index 000000000..de30d0d33 --- /dev/null +++ b/scripts/eressea/path.lua @@ -0,0 +1,6 @@ +if config.paths ~= nil then + for path in string.gmatch(config.paths, "([^:]+)") do + package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua' + end +end +print(package.path)