diff options
Diffstat (limited to 'src/mods.cpp')
-rw-r--r-- | src/mods.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mods.cpp b/src/mods.cpp index 6126de7a1..a81dd4604 100644 --- a/src/mods.cpp +++ b/src/mods.cpp @@ -17,15 +17,15 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include <cctype> +#include <fstream> #include "mods.h" -#include "main.h" #include "filesys.h" #include "strfnd.h" #include "log.h" #include "subgame.h" #include "settings.h" #include "strfnd.h" -#include <cctype> #include "convert_json.h" static bool parseDependsLine(std::istream &is, @@ -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(); |