diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-05-28 23:42:53 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-28 23:42:53 -0400 |
| commit | da35955d6c15c4abc83ae8c0a4ea8195c0c0ac85 (patch) | |
| tree | beab5513b64e93c32d50f628321654623b603129 /src/modinfo.h | |
| parent | 652d3ab054cd2bd94fe88dc42aa39798fc3b2c4a (diff) | |
| parent | 0a5790b333883c7c4ef07bb44f0a411ce8ba79b5 (diff) | |
Merge pull request #1092 from Holt59/mod-data-content
Use ModDataContent feature from GamePlugin
Diffstat (limited to 'src/modinfo.h')
| -rw-r--r-- | src/modinfo.h | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/src/modinfo.h b/src/modinfo.h index 29e6124d..a6c8ea65 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -87,24 +87,6 @@ public: FLAG_TRACKED, }; - enum EContent { - CONTENT_PLUGIN, - CONTENT_TEXTURE, - CONTENT_MESH, - CONTENT_BSA, - CONTENT_INTERFACE, - CONTENT_SOUND, - CONTENT_SCRIPT, - CONTENT_SKSE, - CONTENT_SKSEFILES, - CONTENT_SKYPROC, - CONTENT_MCM, - CONTENT_INI, - CONTENT_MODGROUP - }; - - static const int NUM_CONTENT_TYPES = CONTENT_MODGROUP + 1; - enum EHighlight { HIGHLIGHT_NONE = 0, HIGHLIGHT_INVALID = 1, @@ -248,13 +230,6 @@ public: // static bool isRegularName(const QString& name); - /** - * @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; } @@ -546,7 +521,7 @@ public: /** * @return a list of content types contained in a mod */ - virtual std::vector<EContent> getContents() const { return std::vector<EContent>(); } + virtual const std::set<int>& getContents() const = 0; /** * @brief test if the specified flag is set for this mod @@ -563,11 +538,13 @@ public: bool hasAnyOfTheseFlags(std::vector<ModInfo::EFlag> flags) 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 + * @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. */ - bool hasContent(ModInfo::EContent content) const; + virtual bool hasContent(int content) const = 0; /** * @return an indicator if and how this mod should be highlighted by the UI |
