forked from github/server
update config files to use game.rules from eressea.ini.
ToDo: set rules from command line with -r
This commit is contained in:
parent
2bec7e2bbe
commit
30e9565ae6
|
@ -8,8 +8,9 @@ memcheck = 0
|
||||||
locales = de,en
|
locales = de,en
|
||||||
|
|
||||||
[config]
|
[config]
|
||||||
source_dir = ../server
|
source_dir = ../git
|
||||||
maxnmrs = 20
|
maxnmrs = 20
|
||||||
|
rules = eressea ; use -r to override
|
||||||
|
|
||||||
[editor]
|
[editor]
|
||||||
color = 1
|
color = 1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require(config.game .. ".modules")
|
require(config.rules .. ".modules")
|
||||||
require "default"
|
require "default"
|
||||||
require "resources"
|
require "resources"
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ function run_tests()
|
||||||
end
|
end
|
||||||
|
|
||||||
function run_turn()
|
function run_turn()
|
||||||
require(config.game .. ".main")
|
require(config.rules .. ".main")
|
||||||
|
|
||||||
local turn = get_turn()
|
local turn = get_turn()
|
||||||
if turn<0 then
|
if turn<0 then
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
local srcpath = config.source_dir
|
local srcpath = config.source_dir
|
||||||
local respath = srcpath .. '/' .. config.game .. '/res/'
|
local respath = srcpath .. '/' .. config.rules .. '/res/'
|
||||||
local paths = { config.game..'/scripts/?.lua';'lunit/?.lua','external/lunit/?.lua','scripts/?.lua';'scripts/?' }
|
local paths = { config.rules..'/scripts/?.lua';'lunit/?.lua','external/lunit/?.lua','scripts/?.lua';'scripts/?' }
|
||||||
|
|
||||||
tests = {'common'}
|
tests = {'common'}
|
||||||
for idx, test in pairs(tests) do
|
for idx, test in pairs(tests) do
|
||||||
|
@ -11,6 +11,6 @@ for idx, path in pairs(paths) do
|
||||||
package.path = srcpath .. '/' .. path .. ';' .. package.path
|
package.path = srcpath .. '/' .. path .. ';' .. package.path
|
||||||
end
|
end
|
||||||
|
|
||||||
read_xml(respath..'config-'..config.game..'.xml', respath..'catalog-'..config.game..'.xml')
|
read_xml('config.xml', 'catalog.xml')
|
||||||
|
|
||||||
require "init"
|
require "init"
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "multis"
|
||||||
|
|
||||||
function apply_fixes()
|
function apply_fixes()
|
||||||
local turn = get_turn()
|
local turn = get_turn()
|
||||||
if config.game=="eressea" and turn>654 and turn<662 then
|
if config.rules=="eressea" and turn>654 and turn<662 then
|
||||||
print("Fixing familiars")
|
print("Fixing familiars")
|
||||||
fix_familiars()
|
fix_familiars()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue