summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-09 14:37:41 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-09 14:37:41 +0300
commite0baa7398ca03060e5fe11c7647ae80ae258beeb (patch)
tree0fd71caa9678ec4fa4f44964229e374627f294dd /src/resources
parent46585d7c62a53bfaf5173aa4e67d64735af1d2ed (diff)
downloadmanaverse-e0baa7398ca03060e5fe11c7647ae80ae258beeb.tar.gz
manaverse-e0baa7398ca03060e5fe11c7647ae80ae258beeb.tar.bz2
manaverse-e0baa7398ca03060e5fe11c7647ae80ae258beeb.tar.xz
manaverse-e0baa7398ca03060e5fe11c7647ae80ae258beeb.zip
add support for localdir option in moddb.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/db/moddb.cpp4
-rw-r--r--src/resources/modinfo.cpp3
-rw-r--r--src/resources/modinfo.h7
3 files changed, 12 insertions, 2 deletions
diff --git a/src/resources/db/moddb.cpp b/src/resources/db/moddb.cpp
index aa785afdb..32846696b 100644
--- a/src/resources/db/moddb.cpp
+++ b/src/resources/db/moddb.cpp
@@ -83,10 +83,12 @@ void ModDB::loadXmlFile(const std::string &fileName)
currentInfo = new ModInfo;
currentInfo->setName(name);
- currentInfo->setDescription(XML::getProperty(
+ currentInfo->setDescription(XML::langProperty(
modNode, "description", ""));
currentInfo->setHelp(XML::getProperty(
modNode, "help", ""));
+ currentInfo->setLocalDir(XML::getProperty(
+ modNode, "localdir", ""));
mModInfos[name] = currentInfo;
}
diff --git a/src/resources/modinfo.cpp b/src/resources/modinfo.cpp
index 61af5b2a1..2774343ee 100644
--- a/src/resources/modinfo.cpp
+++ b/src/resources/modinfo.cpp
@@ -28,6 +28,7 @@ ModInfo::ModInfo() :
// TRANSLATORS: being info default name
mName(_("unnamed")),
mDescription(),
- mHelp()
+ mHelp(),
+ mLocalDir()
{
}
diff --git a/src/resources/modinfo.h b/src/resources/modinfo.h
index e2acf31cd..b621e45d8 100644
--- a/src/resources/modinfo.h
+++ b/src/resources/modinfo.h
@@ -51,10 +51,17 @@ class ModInfo final
const std::string &getHelp() const A_WARN_UNUSED
{ return mHelp; }
+ void setLocalDir(const std::string &text)
+ { mLocalDir = text; }
+
+ const std::string &getLocalDir() const A_WARN_UNUSED
+ { return mLocalDir; }
+
private:
std::string mName;
std::string mDescription;
std::string mHelp;
+ std::string mLocalDir;
};
typedef std::map<std::string, ModInfo*> ModInfos;