From 67e74936ff3ff0ac1b56df32975206dcdd0d8762 Mon Sep 17 00:00:00 2001 From: Zackhasacat Date: Wed, 1 Nov 2023 13:23:32 -0500 Subject: [PATCH] Make classes Read Only --- apps/openmw/mwlua/classbindings.cpp | 2 +- apps/openmw/mwlua/luabindings.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwlua/classbindings.cpp b/apps/openmw/mwlua/classbindings.cpp index 237aaae291..d0f5767226 100644 --- a/apps/openmw/mwlua/classbindings.cpp +++ b/apps/openmw/mwlua/classbindings.cpp @@ -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); } } diff --git a/apps/openmw/mwlua/luabindings.cpp b/apps/openmw/mwlua/luabindings.cpp index 1731b4dd70..782cc07c46 100644 --- a/apps/openmw/mwlua/luabindings.cpp +++ b/apps/openmw/mwlua/luabindings.cpp @@ -163,7 +163,7 @@ namespace MWLua character["factions"] = &MWBase::Environment::get().getWorld()->getStore().get(); 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* gmstStore = &MWBase::Environment::get().getESMStore()->get();