diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-11 20:59:12 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-11 22:24:04 +0300 |
commit | af8863d722f06153877d289b939b5ba84713621d (patch) | |
tree | cbb97e2ea203d40615c49803c50b7f3c82f53ad6 /src/resources/beingcommon.cpp | |
parent | 0148cb8ad0e071464f09ada9eb41625dee038cb8 (diff) | |
download | manaverse-af8863d722f06153877d289b939b5ba84713621d.tar.gz manaverse-af8863d722f06153877d289b939b5ba84713621d.tar.bz2 manaverse-af8863d722f06153877d289b939b5ba84713621d.tar.xz manaverse-af8863d722f06153877d289b939b5ba84713621d.zip |
add support for map layer replacments.
This can be used for mods.
Diffstat (limited to 'src/resources/beingcommon.cpp')
-rw-r--r-- | src/resources/beingcommon.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/resources/beingcommon.cpp b/src/resources/beingcommon.cpp index 7b7a57d9e..388312b34 100644 --- a/src/resources/beingcommon.cpp +++ b/src/resources/beingcommon.cpp @@ -49,7 +49,9 @@ void BeingCommon::readBasicAttributes(BeingInfo *const info, info->setHpBarOffsetY(XML::getProperty(node, "hpBarOffsetY", 0)); } -void BeingCommon::getIncludeFiles(const std::string &dir, StringVect &list) +void BeingCommon::getIncludeFiles(const std::string &dir, + StringVect &list, + const std::string &ext) { const std::string path = dir + "/"; StringVect tempList; @@ -57,7 +59,7 @@ void BeingCommon::getIncludeFiles(const std::string &dir, StringVect &list) FOR_EACH (StringVectCIter, it, tempList) { const std::string &str = *it; - if (findLast(str, ".xml")) + if (findLast(str, ext)) list.push_back(str); } std::sort(list.begin(), list.end()); |