server/scripts/eressea/path.lua
2021-02-22 01:53:01 +01:00

17 lines
468 B
Lua

local path = os.getenv("ERESSEA_DIR")
if not path then
if config.install then
path = config.install
else
path = '.'
end
else
config.install = path
end
path = path .. "/scripts"
package.path = path .. '/?.lua;' .. path .. '/?/init.lua;' .. package.path
if config.paths ~= nil then
for path in string.gmatch(config.paths, "([^:]+)") do
package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua'
end
end