1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Simplify code

This commit is contained in:
Andrei Kortunov 2024-03-16 17:22:07 +04:00
parent 8037ad7f00
commit b657cb2e4c

View File

@ -19,8 +19,7 @@ namespace MWLua
auto vfs = MWBase::Environment::get().getResourceSystem()->getVFS();
api["loadYaml"] = [lua = context.mLua, vfs](std::string_view fileName) {
auto normalizedName = VFS::Path::normalizeFilename(fileName);
auto file = vfs->getNormalized(normalizedName);
Files::IStreamPtr file = vfs->get(VFS::Path::Normalized(fileName));
return LuaUtil::YamlLoader::load(*file, lua->sol());
};
api["decodeYaml"] = [lua = context.mLua](std::string_view inputData) {