mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-20 15:40:32 +00:00
Compose BSA, context and script blacklist lists
These would only take their value from the highest priority source, so specifying `openmw --content anExtraEsp.esp` would override all the content files in the user cfg file, and the user cfg file would override any in the global/local one.
This commit is contained in:
parent
fca8634b74
commit
8b28b6e55e
@ -67,7 +67,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
||||
"set local data directory (highest priority)")
|
||||
|
||||
("fallback-archive", bpo::value<Files::EscapeStringVector>()->default_value(Files::EscapeStringVector(), "fallback-archive")
|
||||
->multitoken(), "set fallback BSA archives (later archives have higher priority)")
|
||||
->multitoken()->composing(), "set fallback BSA archives (later archives have higher priority)")
|
||||
|
||||
("resources", bpo::value<Files::EscapeHashString>()->default_value("resources"),
|
||||
"set resources directory")
|
||||
@ -76,7 +76,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
||||
"set initial cell")
|
||||
|
||||
("content", bpo::value<Files::EscapeStringVector>()->default_value(Files::EscapeStringVector(), "")
|
||||
->multitoken(), "content file(s): esm/esp, or omwgame/omwaddon")
|
||||
->multitoken()->composing(), "content file(s): esm/esp, or omwgame/omwaddon")
|
||||
|
||||
("no-sound", bpo::value<bool>()->implicit_value(true)
|
||||
->default_value(false), "disable all sounds")
|
||||
@ -101,7 +101,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
||||
"\t2 - treat warnings as errors")
|
||||
|
||||
("script-blacklist", bpo::value<Files::EscapeStringVector>()->default_value(Files::EscapeStringVector(), "")
|
||||
->multitoken(), "ignore the specified script (if the use of the blacklist is enabled)")
|
||||
->multitoken()->composing(), "ignore the specified script (if the use of the blacklist is enabled)")
|
||||
|
||||
("script-blacklist-use", bpo::value<bool>()->implicit_value(true)
|
||||
->default_value(true), "enable script blacklisting")
|
||||
|
@ -109,7 +109,7 @@ void ConfigurationManager::mergeComposingVariables(boost::program_options::varia
|
||||
|
||||
boost::any& firstValue = variableValue.value();
|
||||
const boost::any& secondValue = second[name].value();
|
||||
|
||||
|
||||
if (firstValue.type() == typeid(Files::EscapePathContainer))
|
||||
{
|
||||
auto& firstPathContainer = boost::any_cast<Files::EscapePathContainer&>(firstValue);
|
||||
@ -117,6 +117,13 @@ void ConfigurationManager::mergeComposingVariables(boost::program_options::varia
|
||||
|
||||
firstPathContainer.insert(firstPathContainer.end(), secondPathContainer.begin(), secondPathContainer.end());
|
||||
}
|
||||
else if (firstValue.type() == typeid(Files::EscapeStringVector))
|
||||
{
|
||||
auto& firstVector = boost::any_cast<Files::EscapeStringVector&>(firstValue);
|
||||
const auto& secondVector = boost::any_cast<const Files::EscapeStringVector&>(secondValue);
|
||||
|
||||
firstVector.mVector.insert(firstVector.mVector.end(), secondVector.mVector.begin(), secondVector.mVector.end());
|
||||
}
|
||||
else if (firstValue.type() == typeid(Fallback::FallbackMap))
|
||||
{
|
||||
auto& firstMap = boost::any_cast<Fallback::FallbackMap&>(firstValue);
|
||||
|
Loading…
x
Reference in New Issue
Block a user