mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
Make classes Read Only
This commit is contained in:
parent
482d174ef2
commit
67e74936ff
@ -82,6 +82,6 @@ namespace MWLua
|
|||||||
[](const ESM::Class& rec) -> std::string_view { return getSpecialization(rec.mData.mSpecialization); });
|
[](const ESM::Class& rec) -> std::string_view { return getSpecialization(rec.mData.mSpecialization); });
|
||||||
classT["isPlayable"]
|
classT["isPlayable"]
|
||||||
= sol::readonly_property([](const ESM::Class& rec) -> bool { return rec.mData.mIsPlayable; });
|
= sol::readonly_property([](const ESM::Class& rec) -> bool { return rec.mData.mIsPlayable; });
|
||||||
return classes;
|
return LuaUtil::makeReadOnly(classes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ namespace MWLua
|
|||||||
character["factions"] = &MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>();
|
character["factions"] = &MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>();
|
||||||
|
|
||||||
character["classes"] = initCoreClassBindings(context);
|
character["classes"] = initCoreClassBindings(context);
|
||||||
api["character"] = LuaUtil::makeReadOnly(character);;
|
api["character"] = LuaUtil::makeReadOnly(character);
|
||||||
api["l10n"] = LuaUtil::initL10nLoader(lua->sol(), MWBase::Environment::get().getL10nManager());
|
api["l10n"] = LuaUtil::initL10nLoader(lua->sol(), MWBase::Environment::get().getL10nManager());
|
||||||
const MWWorld::Store<ESM::GameSetting>* gmstStore
|
const MWWorld::Store<ESM::GameSetting>* gmstStore
|
||||||
= &MWBase::Environment::get().getESMStore()->get<ESM::GameSetting>();
|
= &MWBase::Environment::get().getESMStore()->get<ESM::GameSetting>();
|
||||||
|
Loading…
Reference in New Issue
Block a user