diff options
Diffstat (limited to 'src/modinfo.h')
| -rw-r--r-- | src/modinfo.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/modinfo.h b/src/modinfo.h index 4534841d..33e6ec96 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -72,6 +72,7 @@ public: CONTENT_PLUGIN,
CONTENT_TEXTURE,
CONTENT_MESH,
+ CONTENT_BSA,
CONTENT_INTERFACE,
CONTENT_MUSIC,
CONTENT_SOUND,
@@ -81,6 +82,8 @@ public: CONTENT_STRING
};
+ static const int NUM_CONTENT_TYPES = CONTENT_STRING + 1;
+
enum EHighlight {
HIGHLIGHT_NONE = 0,
HIGHLIGHT_INVALID = 1,
@@ -182,6 +185,13 @@ public: */
static ModInfo::Ptr createFromPlugin(const QString &espName, const QStringList &bsaNames, MOShared::DirectoryEntry **directoryStructure);
+ /**
+ * @brief retieve a name for one of the CONTENT_ enums
+ * @param contentType the content value
+ * @return a display string
+ */
+ static QString getContentTypeName(int contentType);
+
virtual bool isRegular() const { return false; }
virtual bool isEmpty() const { return false; }
@@ -328,6 +338,13 @@ public: virtual QString name() const = 0;
/**
+ * @brief getter for an internal name. This is usually the same as the regular name, but with special mod types it might be
+ * this is used to distinguish between mods that have the same visible name
+ * @return internal mod name
+ */
+ virtual QString internalName() const { return name(); }
+
+ /**
* @brief getter for the mod path
*
* @return the (absolute) path to the mod
@@ -410,6 +427,13 @@ public: bool hasFlag(EFlag flag) const;
/**
+ * @brief test if the mods contains the specified content
+ * @param content the content to test
+ * @return true if the content is there, false otherwise
+ */
+ bool hasContent(ModInfo::EContent content) const;
+
+ /**
* @return an indicator if and how this mod should be highlighted by the UI
*/
virtual int getHighlight() const { return HIGHLIGHT_NONE; }
@@ -513,6 +537,21 @@ public: */
virtual void saveMeta() {}
+ /**
+ * @return retrieve list of mods (as mod index) that are overwritten by this one. Updates may be delayed
+ */
+ virtual std::set<unsigned int> getModOverwrite() { return std::set<unsigned int>(); }
+
+ /**
+ * @return list of mods (as mod index) that overwrite this one. Updates may be delayed
+ */
+ virtual std::set<unsigned int> getModOverwritten() { return std::set<unsigned int>(); }
+
+ /**
+ * @brief update conflict information
+ */
+ virtual void doConflictCheck() const {}
+
signals:
/**
@@ -566,6 +605,13 @@ public: * @brief clear all caches held for this mod
*/
virtual void clearCaches();
+
+ virtual std::set<unsigned int> getModOverwrite() { return m_OverwriteList; }
+
+ virtual std::set<unsigned int> getModOverwritten() { return m_OverwrittenList; }
+
+ virtual void doConflictCheck() const;
+
private:
enum EConflictType {
@@ -595,6 +641,9 @@ private: mutable EConflictType m_CurrentConflictState;
mutable QTime m_LastConflictCheck;
+ mutable std::set<unsigned int> m_OverwriteList; // indices of mods overritten by this mod
+ mutable std::set<unsigned int> m_OverwrittenList; // indices of mods overwriting this mod
+
};
@@ -918,6 +967,9 @@ private: NexusBridge m_NexusBridge;
+ mutable std::vector<ModInfo::EContent> m_CachedContent;
+ mutable QTime m_LastContentCheck;
+
};
@@ -1039,6 +1091,7 @@ public: virtual void endorse(bool) {}
virtual bool isEmpty() const { return false; }
virtual QString name() const;
+ virtual QString internalName() const { return name(); }
virtual QString notes() const { return ""; }
virtual QDateTime creationTime() const;
virtual QString absolutePath() const;
|
