forked from teamnwah/openmw-tes3coop
added --data-local switch
This commit is contained in:
parent
e60f0e3b38
commit
ef1e986a87
1 changed files with 7 additions and 0 deletions
|
@ -46,6 +46,8 @@ bool parseOptions (int argc, char**argv, OMW::Engine& engine)
|
|||
->default_value (std::vector<std::string>(), "data")
|
||||
->multitoken(),
|
||||
"set data directories (later directories have higher priority)")
|
||||
("data-local", bpo::value<std::string>()->default_value (""),
|
||||
"set local data directory (highest priority)")
|
||||
("resources", bpo::value<std::string>()->default_value ("resources"),
|
||||
"set resources directory")
|
||||
("start", bpo::value<std::string>()->default_value ("Beshara"),
|
||||
|
@ -109,6 +111,11 @@ bool parseOptions (int argc, char**argv, OMW::Engine& engine)
|
|||
// directory settings
|
||||
std::vector<std::string> dataDirs = variables["data"].as<std::vector<std::string> >();
|
||||
std::vector<boost::filesystem::path> dataDirs2 (dataDirs.begin(), dataDirs.end());
|
||||
|
||||
std::string local = variables["data-local"].as<std::string>();
|
||||
if (!local.empty())
|
||||
dataDirs.push_back (local);
|
||||
|
||||
engine.setDataDirs (dataDirs2);
|
||||
|
||||
engine.setResourceDir (variables["resources"].as<std::string>());
|
||||
|
|
Loading…
Reference in a new issue