mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
@@ -116,17 +116,15 @@ function getConflictingPluginsFromFilter() {
|
||||
|
||||
return loot.query(request).then(function(result){
|
||||
result = JSON.parse(result);
|
||||
var plugins = [];
|
||||
for (var key in result) {
|
||||
plugins.push(key);
|
||||
for (var key in result.crcs) {
|
||||
for (var i = 0; i < loot.game.plugins.length; ++i) {
|
||||
if (loot.game.plugins[i].name == key) {
|
||||
loot.game.plugins[i].crc = result[key];
|
||||
loot.game.plugins[i].crc = result.crcs[key];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return plugins;
|
||||
return result.conflicts;
|
||||
}).catch(processCefError);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -255,16 +255,19 @@ namespace loot {
|
||||
g_app_state.CurrentGame().LoadPlugins(false);
|
||||
|
||||
map<string, uint32_t> conflictingPlugins;
|
||||
YAML::Node node;
|
||||
if (pluginIt != g_app_state.CurrentGame().plugins.end()) {
|
||||
for (const auto& pluginPair : g_app_state.CurrentGame().plugins) {
|
||||
if (pluginIt->second.DoFormIDsOverlap(pluginPair.second)) {
|
||||
BOOST_LOG_TRIVIAL(debug) << "Found conflicting plugin: " << pluginPair.second.Name();
|
||||
conflictingPlugins.emplace(pluginPair.second.Name(), pluginPair.second.Crc());
|
||||
node["conflicts"].push_back(pluginPair.second.Name());
|
||||
}
|
||||
node["crcs"][pluginPair.second.Name()] = pluginPair.second.Crc();
|
||||
}
|
||||
}
|
||||
|
||||
callback->Success(JSON::stringify(YAML::Node(conflictingPlugins)));
|
||||
callback->Success(JSON::stringify(node));
|
||||
return true;
|
||||
}
|
||||
else if (requestName == "copyMetadata") {
|
||||
|
||||
Reference in New Issue
Block a user