add config.path parsing to a module of its own.

This commit is contained in:
Enno Rehling 2014-08-06 23:47:16 +02:00
parent 405c63f447
commit 7348ce698b
2 changed files with 7 additions and 7 deletions

View File

@ -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'

6
scripts/eressea/path.lua Normal file
View File

@ -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)