diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-25 19:53:21 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-25 19:54:15 +0200 |
| commit | cf1bbdd13e0db8856df672c367d3ec1610f6c556 (patch) | |
| tree | 461a6b7623a186502f00b07df689ffebfea620b0 /src/modinfowithconflictinfo.h | |
| parent | a721347fd130fcab19f2709892093f087bfac19e (diff) | |
Switch to using the ModDataContent feature from the game plugin.
Diffstat (limited to 'src/modinfowithconflictinfo.h')
| -rw-r--r-- | src/modinfowithconflictinfo.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/modinfowithconflictinfo.h b/src/modinfowithconflictinfo.h index abc9f223..b66a7444 100644 --- a/src/modinfowithconflictinfo.h +++ b/src/modinfowithconflictinfo.h @@ -24,7 +24,16 @@ public: /** * @return a list of content types contained in a mod */ - virtual std::vector<EContent> getContents() const override; + virtual const std::vector<int>& getContents() const override; + + /** + * @brief Test if the mod contains the specified content. + * + * @param content ID of the content to test. + * + * @return true if the content is there, false otherwise. + */ + virtual bool hasContent(int content) const override; /** * @brief clear all caches held for this mod @@ -66,7 +75,7 @@ protected: * * @return the contents for this mod. **/ - virtual std::vector<EContent> doGetContents() const { return {}; } + virtual std::vector<int> doGetContents() const { return {}; } /** * @brief Retrieve a file tree corresponding to the underlying disk content @@ -137,7 +146,7 @@ private: MOShared::MemoizedLocked<std::shared_ptr<const MOBase::IFileTree>> m_FileTree; MOShared::MemoizedLocked<bool> m_Valid; - MOShared::MemoizedLocked<std::vector<EContent>> m_Contents; + MOShared::MemoizedLocked<std::vector<int>> m_Contents; MOShared::DirectoryEntry **m_DirectoryStructure; |
