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

Make classes Read Only

This commit is contained in:
Zackhasacat 2023-11-01 13:23:32 -05:00
parent 482d174ef2
commit 67e74936ff
2 changed files with 2 additions and 2 deletions

View File

@ -82,6 +82,6 @@ namespace MWLua
[](const ESM::Class& rec) -> std::string_view { return getSpecialization(rec.mData.mSpecialization); });
classT["isPlayable"]
= sol::readonly_property([](const ESM::Class& rec) -> bool { return rec.mData.mIsPlayable; });
return classes;
return LuaUtil::makeReadOnly(classes);
}
}

View File

@ -163,7 +163,7 @@ namespace MWLua
character["factions"] = &MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>();
character["classes"] = initCoreClassBindings(context);
api["character"] = LuaUtil::makeReadOnly(character);;
api["character"] = LuaUtil::makeReadOnly(character);
api["l10n"] = LuaUtil::initL10nLoader(lua->sol(), MWBase::Environment::get().getL10nManager());
const MWWorld::Store<ESM::GameSetting>* gmstStore
= &MWBase::Environment::get().getESMStore()->get<ESM::GameSetting>();