aboutsummaryrefslogtreecommitdiff
path: root/libs/game_bethesda/src/games/fallout4/fallout4moddatacontent.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/game_bethesda/src/games/fallout4/fallout4moddatacontent.h')
-rw-r--r--libs/game_bethesda/src/games/fallout4/fallout4moddatacontent.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/libs/game_bethesda/src/games/fallout4/fallout4moddatacontent.h b/libs/game_bethesda/src/games/fallout4/fallout4moddatacontent.h
new file mode 100644
index 0000000..172e94f
--- /dev/null
+++ b/libs/game_bethesda/src/games/fallout4/fallout4moddatacontent.h
@@ -0,0 +1,44 @@
+#ifndef FALLOUT4_MODDATACONTENT_H
+#define FALLOUT4_MODDATACONTENT_H
+
+#include <gamebryomoddatacontent.h>
+#include <ifiletree.h>
+
+class Fallout4ModDataContent : public GamebryoModDataContent
+{
+protected:
+ enum Fallout4Content
+ {
+ CONTENT_MATERIAL = CONTENT_NEXT_VALUE
+ };
+
+public:
+ Fallout4ModDataContent(const MOBase::IGameFeatures* gameFeatures)
+ : GamebryoModDataContent(gameFeatures)
+ {
+ m_Enabled[CONTENT_SKYPROC] = false;
+ }
+
+ std::vector<Content> getAllContents() const override
+ {
+ auto contents = GamebryoModDataContent::getAllContents();
+ contents.push_back(
+ Content(CONTENT_MATERIAL, "Materials", ":/MO/gui/content/material"));
+ return contents;
+ }
+
+ std::vector<int>
+ getContentsFor(std::shared_ptr<const MOBase::IFileTree> fileTree) const override
+ {
+ auto contents = GamebryoModDataContent::getContentsFor(fileTree);
+ for (auto e : *fileTree) {
+ if (e->compare("materials") == 0) {
+ contents.push_back(CONTENT_MATERIAL);
+ break; // Early break if you have nothing else to check.
+ }
+ }
+ return contents;
+ }
+};
+
+#endif // FALLOUT4_MODDATACONTENT_H