From e9992db51c24ebc6ca634e6cce73b7e6a22a3527 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 24 May 2015 09:09:34 +0200 Subject: [PATCH] fix pool test (GiveRestriction broke it). - do not default to loading the E2 rules for tests, so GiveRestriction will not be set to a default value. - only load configuration if a ruleset has been defined. --- .gitignore | 1 + conf/eressea.ini | 1 - scripts/eressea/xmlconf.lua | 7 +++---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 069957d8a..ddabf2337 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ game-e3/reports/ *.log.* tags Thumbs.db +.gdb_history diff --git a/conf/eressea.ini b/conf/eressea.ini index a0d0b9fed..e14d0af50 100644 --- a/conf/eressea.ini +++ b/conf/eressea.ini @@ -12,7 +12,6 @@ locales = de,en install = . paths = lunit:scripts maxnmrs = 20 -rules = e2 [editor] color = 1 diff --git a/scripts/eressea/xmlconf.lua b/scripts/eressea/xmlconf.lua index 9dfdca595..9d87f3f3e 100644 --- a/scripts/eressea/xmlconf.lua +++ b/scripts/eressea/xmlconf.lua @@ -2,9 +2,8 @@ local confdir = 'conf/' if config.install then confdir = config.install .. '/' .. confdir end -rules='' if config.rules then - rules = config.rules .. '/' + local rules = config.rules .. '/' + assert(0 == read_xml(confdir .. rules .. 'config.xml', confdir .. rules .. 'catalog.xml'), "could not load XML data, did you compile with LIBXML2 ?") + assert(0 == eressea.config.read(rules .. 'config.json', confdir), "could not read JSON data") end -assert(0 == read_xml(confdir .. rules .. 'config.xml', confdir .. rules .. 'catalog.xml'), "could not load XML data, did you compile with LIBXML2 ?") -assert(0 == eressea.config.read(rules .. 'config.json', confdir), "could not read JSON data")