Make builtin.omwscripts actually mandatory

Previously it was quasi-mandatory - lots of things would add it, e.g. when running openmw through the CS, but it could technically be disabled.

Now it's treated like the resources/vfs directory and implicitly added by the engine etc.
pull/3235/head
AnyOldName3 10 months ago
parent 357bf3db61
commit 626f438dcc

@ -146,7 +146,9 @@ namespace
dataDirs.insert(dataDirs.begin(), resDir / "vfs"); dataDirs.insert(dataDirs.begin(), resDir / "vfs");
const Files::Collections fileCollections(dataDirs); const Files::Collections fileCollections(dataDirs);
const auto& archives = variables["fallback-archive"].as<StringsVector>(); const auto& archives = variables["fallback-archive"].as<StringsVector>();
const auto& contentFiles = variables["content"].as<StringsVector>(); StringsVector contentFiles{ "builtin.omwscripts" };
const auto& configContentFiles = variables["content"].as<StringsVector>();
contentFiles.insert(contentFiles.end(), configContentFiles.begin(), configContentFiles.end());
Fallback::Map::init(variables["fallback"].as<Fallback::FallbackMap>().mMap); Fallback::Map::init(variables["fallback"].as<Fallback::FallbackMap>().mMap);

@ -165,7 +165,9 @@ namespace NavMeshTool
dataDirs.insert(dataDirs.begin(), resDir / "vfs"); dataDirs.insert(dataDirs.begin(), resDir / "vfs");
const Files::Collections fileCollections(dataDirs); const Files::Collections fileCollections(dataDirs);
const auto& archives = variables["fallback-archive"].as<StringsVector>(); const auto& archives = variables["fallback-archive"].as<StringsVector>();
const auto& contentFiles = variables["content"].as<StringsVector>(); StringsVector contentFiles{ "builtin.omwscripts" };
const auto& configContentFiles = variables["content"].as<StringsVector>();
contentFiles.insert(contentFiles.end(), configContentFiles.begin(), configContentFiles.end());
const std::size_t threadsNumber = variables["threads"].as<std::size_t>(); const std::size_t threadsNumber = variables["threads"].as<std::size_t>();
if (threadsNumber < 1) if (threadsNumber < 1)

@ -93,7 +93,6 @@ void CSMDoc::Runner::start(bool delayed)
arguments << "--data=\"" + Files::pathToQString(mProjectPath.parent_path()) + "\""; arguments << "--data=\"" + Files::pathToQString(mProjectPath.parent_path()) + "\"";
arguments << "--replace=content"; arguments << "--replace=content";
arguments << "--content=builtin.omwscripts";
for (const auto& mContentFile : mContentFiles) for (const auto& mContentFile : mContentFiles)
{ {

@ -108,7 +108,8 @@ bool parseOptions(int argc, char** argv, OMW::Engine& engine, Files::Configurati
Log(Debug::Error) << "No content file given (esm/esp, nor omwgame/omwaddon). Aborting..."; Log(Debug::Error) << "No content file given (esm/esp, nor omwgame/omwaddon). Aborting...";
return false; return false;
} }
std::set<std::string> contentDedupe; engine.addContentFile("builtin.omwscripts");
std::set<std::string> contentDedupe{ "builtin.omwscripts" };
for (const auto& contentFile : content) for (const auto& contentFile : content)
{ {
if (!contentDedupe.insert(contentFile).second) if (!contentDedupe.insert(contentFile).second)

@ -434,10 +434,6 @@ void ContentSelectorModel::ContentModel::addFiles(const QString& path, bool newf
{ {
QFileInfo info(dir.absoluteFilePath(path2)); QFileInfo info(dir.absoluteFilePath(path2));
// Enabled by default in system openmw.cfg; shouldn't be shown in content list.
if (info.fileName().compare("builtin.omwscripts", Qt::CaseInsensitive) == 0)
continue;
EsmFile* file = const_cast<EsmFile*>(item(info.fileName())); EsmFile* file = const_cast<EsmFile*>(item(info.fileName()));
bool add = file == nullptr; bool add = file == nullptr;
std::unique_ptr<EsmFile> newFile; std::unique_ptr<EsmFile> newFile;

@ -2,7 +2,6 @@
# Modifications should be done on the user openmw.cfg file instead # Modifications should be done on the user openmw.cfg file instead
# (see: https://openmw.readthedocs.io/en/master/reference/modding/paths.html) # (see: https://openmw.readthedocs.io/en/master/reference/modding/paths.html)
content=builtin.omwscripts
data-local="?userdata?data" data-local="?userdata?data"
user-data="?userdata?" user-data="?userdata?"
config="?userconfig?" config="?userconfig?"

@ -2,7 +2,6 @@
# Modifications should be done on the user openmw.cfg file instead # Modifications should be done on the user openmw.cfg file instead
# (see: https://openmw.readthedocs.io/en/master/reference/modding/paths.html) # (see: https://openmw.readthedocs.io/en/master/reference/modding/paths.html)
content=builtin.omwscripts
data-local="?userdata?data" data-local="?userdata?data"
user-data="?userdata?" user-data="?userdata?"
config="?userconfig?" config="?userconfig?"

Loading…
Cancel
Save