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 | 9879aae5757e0c2ca930b38c6b7a4aeb4715d2d9 (patch) | |
| tree | 43ccc85bf5998c4e37abc7cdb627b49276cc441b /src/modinfo.cpp | |
| parent | cc9827cdda5776a4fd540a2ab0fb8a08ec9f75a7 (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 fff613dc..127f7c4c 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);
@@ -799,6 +799,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;
@@ -954,6 +976,8 @@ QStringList ModInfoOverwrite::archives() const return result;
}
+const char ModInfoForeign::INT_IDENTIFIER[] = "__int__foreign";
+
QString ModInfoForeign::name() const
{
return m_Name;
|
