diff options
| author | Tannin <devnull@localhost> | 2015-01-29 19:26:42 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-01-29 19:26:42 +0100 |
| commit | 8aa6dc4c7dcf4139cd0144207a327013bd3cb1dc (patch) | |
| tree | 06a28839549304e32b5774b37fba07ca4413bc03 /src/modinfo.cpp | |
| parent | c3a95bdef1d989a54684b966e042b12bf682046d (diff) | |
extended the game-plugin interface
Diffstat (limited to 'src/modinfo.cpp')
| -rw-r--r-- | src/modinfo.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp index b1d9bed4..3b8d6b92 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -28,8 +28,10 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "messagedialog.h" #include <gameinfo.h> +#include <iplugingame.h> #include <versioninfo.h> #include <appconfig.h> +#include <scriptextender.h> #include <QApplication> @@ -862,7 +864,13 @@ std::vector<ModInfo::EContent> ModInfoRegular::getContents() const if (dir.entryList(QStringList() << "*.esp" << "*.esm").size() > 0) { result.push_back(CONTENT_PLUGIN); } - QString sePluginPath = ToQString(GameInfo::instance().getSEName()) + "/plugins"; + + ScriptExtender *extender = qApp->property("managed_game").value<IPluginGame*>()->feature<ScriptExtender>(); + + if (extender != nullptr) { + QString sePluginPath = extender->name() + "/plugins"; + if (dir.exists(sePluginPath)) result.push_back(CONTENT_SKSE); + } if (dir.exists("textures")) result.push_back(CONTENT_TEXTURE); if (dir.exists("meshes")) result.push_back(CONTENT_MESH); if (dir.exists("interface") @@ -870,7 +878,6 @@ std::vector<ModInfo::EContent> ModInfoRegular::getContents() const 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; |
