From b7ee14cadb1e5675f7e36565aec1fe39e55ccc34 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Jan 2014 14:47:39 +0300 Subject: add ability to inlude config parts from subdirs for items, monsters, npcs. --- src/resources/db/itemdb.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/resources/db/itemdb.cpp') diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 81feaea47..4c47658e6 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -25,6 +25,7 @@ #include "configuration.h" #include "logger.h" +#include "resources/beingcommon.h" #include "resources/iteminfo.h" #include "utils/dtor.h" @@ -211,6 +212,11 @@ void ItemDB::load() mUnknown->addTag(mTags["All"]); loadXmlFile(paths.getStringValue("itemsFile"), tagNum); loadXmlFile(paths.getStringValue("itemsPatchFile"), tagNum); + + StringVect list; + BeingCommon::getIncludeFiles(paths.getStringValue("itemsPatchDir"), list); + FOR_EACH (StringVectCIter, it, list) + loadXmlFile(*it, tagNum); } void ItemDB::loadXmlFile(const std::string &fileName, int &tagNum) -- cgit v1.2.3-70-g09d2