diff --git a/src/backend/metadata.cpp b/src/backend/metadata.cpp index 94116abf..4d0a46be 100644 --- a/src/backend/metadata.cpp +++ b/src/backend/metadata.cpp @@ -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")) diff --git a/src/backend/metadata.h b/src/backend/metadata.h index 62791f8d..7f1e28b8 100644 --- a/src/backend/metadata.h +++ b/src/backend/metadata.h @@ -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.