diff --git a/scripts/map.lua b/scripts/map.lua index 60a2487db..cad3ae1fd 100644 --- a/scripts/map.lua +++ b/scripts/map.lua @@ -1,3 +1,9 @@ +local path = 'scripts' +if config.install then + path = config.install .. '/' .. path +end +package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua' +require 'eressea.path' require 'eressea' require 'eressea.xmlconf' eressea.read_game(get_turn() .. ".dat") diff --git a/scripts/run-turn.lua b/scripts/run-turn.lua index f1eb1c875..92d07ad6b 100644 --- a/scripts/run-turn.lua +++ b/scripts/run-turn.lua @@ -182,12 +182,6 @@ function run_turn(rules) return result end -local path = 'scripts' -if config.install then - path = config.install .. '/' .. path -end -package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua' - require 'eressea' require 'eressea.xmlconf' -- read xml data