mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Added plugin sorting function that puts masters before non-masterrs.
This commit is contained in:
@@ -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"))
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user