From af8863d722f06153877d289b939b5ba84713621d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 11 Feb 2014 20:59:12 +0300 Subject: add support for map layer replacments. This can be used for mods. --- src/resources/beingcommon.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/resources/beingcommon.cpp') 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()); -- cgit v1.2.3-60-g2f50