summaryrefslogtreecommitdiff
path: root/src/resources/beingcommon.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-11 20:59:12 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-11 22:24:04 +0300
commitaf8863d722f06153877d289b939b5ba84713621d (patch)
treecbb97e2ea203d40615c49803c50b7f3c82f53ad6 /src/resources/beingcommon.cpp
parent0148cb8ad0e071464f09ada9eb41625dee038cb8 (diff)
downloadplus-af8863d722f06153877d289b939b5ba84713621d.tar.gz
plus-af8863d722f06153877d289b939b5ba84713621d.tar.bz2
plus-af8863d722f06153877d289b939b5ba84713621d.tar.xz
plus-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.cpp6
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());