mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-09 16:56:40 +00:00
Don't attempt to parse table-like objects as ignore lists
This commit is contained in:
parent
851fd91d3c
commit
3558f9c48b
1 changed files with 8 additions and 1 deletions
|
|
@ -30,7 +30,14 @@ namespace
|
|||
{
|
||||
ignore.push_back(ignoreObj->ptr());
|
||||
}
|
||||
else if (const auto& ignoreTable = options.get<sol::optional<sol::table>>("ignore"))
|
||||
else if (const auto& ignoreList = options.get<sol::optional<MWLua::LObjectList>>("ignore"))
|
||||
{
|
||||
for (const MWLua::ObjectId& id : *ignoreList->mIds)
|
||||
{
|
||||
ignore.push_back(MWLua::LObject(id).ptr());
|
||||
}
|
||||
}
|
||||
else if (const auto& ignoreTable = options.get<sol::optional<sol::lua_table>>("ignore"))
|
||||
{
|
||||
ignoreTable->for_each([&](const auto& _, const sol::object& value) {
|
||||
if (value.is<MWLua::LObject>())
|
||||
|
|
|
|||
Loading…
Reference in a new issue