Add mod.conf file support This new file only permits to specify a mod name for now
authorkaeza <kaeza@users.sf.net>
Sat, 21 Feb 2015 17:04:47 +0000 (18:04 +0100)
committerLoic Blot <loic.blot@unix-experience.fr>
Sat, 21 Feb 2015 17:18:06 +0000 (18:18 +0100)
src/mods.cpp

index 6126de7a19d1b08b9edcd55ecd4255438cf4f021..cb5a6b9fd265ff6fd8a42f6359d9747731bf07c8 100644 (file)
@@ -47,6 +47,11 @@ static bool parseDependsLine(std::istream &is,
 void parseModContents(ModSpec &spec)
 {
        // NOTE: this function works in mutual recursion with getModsInPath
+       Settings info;
+       info.readConfigFile((spec.path+DIR_DELIM+"mod.conf").c_str());
+
+       if (info.exists("name"))
+               spec.name = info.get("name");
 
        spec.depends.clear();
        spec.optdepends.clear();