From 463d5c603ea95f478dff4b12fbca3c7dd05cc8b9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Jan 2014 20:43:46 +0300 Subject: add ability to inlude config parts from subdirs for most dbs. --- src/resources/db/colordb.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/resources/db/colordb.cpp') diff --git a/src/resources/db/colordb.cpp b/src/resources/db/colordb.cpp index 276b7e77a..06dff0d3a 100644 --- a/src/resources/db/colordb.cpp +++ b/src/resources/db/colordb.cpp @@ -26,6 +26,8 @@ #include "utils/xml.h" +#include "resources/beingcommon.h" + #include "debug.h" namespace @@ -49,12 +51,19 @@ void ColorDB::load() colors = it->second; loadHair(paths.getStringValue("hairColorFile"), colors); loadHair(paths.getStringValue("hairColorPatchFile"), colors); + StringVect list; + BeingCommon::getIncludeFiles(paths.getStringValue( + "hairColorPatchDir"), list); + FOR_EACH (StringVectCIter, it, list) + loadHair(*it, colors); + mColorLists["hair"] = colors; if (serverVersion >= 1) { loadColorLists(paths.getStringValue("itemColorsFile")); loadColorLists(paths.getStringValue("itemColorsPatchFile")); + loadXmlDir("itemColorsPatchDir", loadColorLists); } it = mColorLists.find("hair"); -- cgit v1.2.3-60-g2f50