Added plugin sorting function that puts masters before non-masterrs.

This commit is contained in:
WrinklyNinja
2013-08-06 18:56:54 +01:00
parent 8acbbcbf01
commit 94d1a3f2b6
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -705,6 +705,13 @@ namespace boss {
return boost::ilexicographical_compare(lhs.Name(), rhs.Name());
}
bool master_sort(const Plugin& lhs, const Plugin& rhs) {
if ((lhs.IsMaster() && !rhs.IsMaster()) || (!lhs.IsMaster() && rhs.IsMaster()))
return true;
else
return false;
}
bool IsPlugin(const std::string& file) {
if (boost::iends_with(file, ".esp") || boost::iends_with(file, ".esm")
|| boost::iends_with(file, ".esp.ghost") || boost::iends_with(file, ".esm.ghost"))
+2
View File
@@ -213,6 +213,8 @@ namespace boss {
bool alpha_sort(const Plugin& lhs, const Plugin& rhs);
bool master_sort(const Plugin& lhs, const Plugin& rhs);
bool IsPlugin(const std::string& file);
//The map maps each plugin name to a vector of names of plugins that overlap with it and should load before it.