diff options
| author | Tannin <devnull@localhost> | 2014-07-21 19:14:24 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-07-21 19:14:24 +0200 |
| commit | 0050cb07409d775efe14e728c1cef4a2c33aa1db (patch) | |
| tree | ed3eb9363aa35617f0dd92c4746bf14e032d010f /src/modinfo.cpp | |
| parent | f6ef5477e718b14af99bd22436f66dee0b9d22cd (diff) | |
- download-list will no longer show a file as having incomplete data if there is no file version
- added a new mod column with icons displaying the content of the mod
- MO now differentiates between mods using an internal name that disambiguates between foreign and regular mods
Diffstat (limited to 'src/modinfo.cpp')
| -rw-r--r-- | src/modinfo.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp index b0351cf4..cb20567e 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -232,7 +232,7 @@ void ModInfo::updateIndices() QRegExp backupRegEx(".*backup[0-9]*$");
for (unsigned int i = 0; i < s_Collection.size(); ++i) {
- QString modName = s_Collection[i]->name();
+ QString modName = s_Collection[i]->internalName();
int modID = s_Collection[i]->getNexusID();
s_ModsByName[modName] = i;
s_ModsByModID[modID].push_back(i);
@@ -804,6 +804,28 @@ std::vector<ModInfo::EFlag> ModInfoRegular::getFlags() const }
+std::vector<ModInfo::EContent> ModInfoRegular::getContents() const
+{
+ std::vector<EContent> result;
+ QDir dir(absolutePath());
+ if (dir.entryList(QStringList() << "*.esp" << "*.esm").size() > 0) {
+ result.push_back(CONTENT_PLUGIN);
+ }
+ QString sePluginPath = ToQString(GameInfo::instance().getSEName()) + "/plugins";
+ if (dir.exists("textures")) result.push_back(CONTENT_TEXTURE);
+ if (dir.exists("meshes")) result.push_back(CONTENT_MESH);
+ if (dir.exists("interface")
+ || dir.exists("menus")) result.push_back(CONTENT_INTERFACE);
+ if (dir.exists("music")) result.push_back(CONTENT_MUSIC);
+ if (dir.exists("sound")) result.push_back(CONTENT_SOUND);
+ if (dir.exists("scripts")) result.push_back(CONTENT_SCRIPT);
+ if (dir.exists(sePluginPath)) result.push_back(CONTENT_SKSE);
+ if (dir.exists("strings")) result.push_back(CONTENT_STRING);
+ if (dir.exists("SkyProc Patchers")) result.push_back(CONTENT_SKYPROC);
+ return result;
+}
+
+
int ModInfoRegular::getHighlight() const
{
return isValid() ? HIGHLIGHT_NONE: HIGHLIGHT_INVALID;
@@ -959,6 +981,8 @@ QStringList ModInfoOverwrite::archives() const return result;
}
+const char ModInfoForeign::INT_IDENTIFIER[] = "__int__foreign";
+
QString ModInfoForeign::name() const
{
return m_Name;
|
