From cf1bbdd13e0db8856df672c367d3ec1610f6c556 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Mon, 25 May 2020 19:53:21 +0200 Subject: Switch to using the ModDataContent feature from the game plugin. --- src/organizercore.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/organizercore.cpp') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 6e4b3fbf..45fe5220 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -135,6 +135,16 @@ OrganizerCore::OrganizerCore(Settings &settings) connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame const *)), &m_PluginList, SLOT(managedGameChanged(MOBase::IPluginGame const *))); + connect(this, &OrganizerCore::managedGameChanged, [this](IPluginGame const* gamePlugin) { + ModDataContent* contentFeature = gamePlugin->feature(); + if (contentFeature) { + m_Contents = contentFeature->getAllContents(); + } + else { + m_Contents = {}; + } + }); + connect(&m_PluginList, &PluginList::writePluginsList, &m_PluginListsWriter, &DelayedFileWriterBase::write); -- cgit v1.3.1