1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-29 22:20:33 +00:00

Add character to core

This commit is contained in:
Zackhasacat 2023-10-25 21:05:14 -05:00
parent 15bee21286
commit f0640da21e
2 changed files with 8 additions and 4 deletions

View File

@ -158,12 +158,13 @@ namespace MWLua
api["magic"] = initCoreMagicBindings(context);
api["stats"] = initCoreStatsBindings(context);
sol::table character(lua->sol(), sol::create);
initCoreFactionBindings(context);
api["factions"] = &MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>();
character["factions"] = &MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>();
initCoreClassBindings(context);
api["classes"] = &MWBase::Environment::get().getWorld()->getStore().get<ESM::Class>();
character["classes"] = &MWBase::Environment::get().getWorld()->getStore().get<ESM::Class>();
api["character"] = character;
api["l10n"] = LuaUtil::initL10nLoader(lua->sol(), MWBase::Environment::get().getL10nManager());
const MWWorld::Store<ESM::GameSetting>* gmstStore
= &MWBase::Environment::get().getESMStore()->get<ESM::GameSetting>();

View File

@ -14,9 +14,12 @@
-- A read-only list of all @{#FactionRecord}s in the world database.
-- @field [parent=#core] #list<#FactionRecord> factions
--- @{#Character}: Class and Character Data
-- @field [parent=#core] #Character character
---
-- A read-only list of all @{#ClassRecord}s in the world database.
-- @field [parent=#core] #list<#ClassRecord> classes
-- @field [parent=#Character] #list<#ClassRecord> classes
---
-- Terminates the game and quits to the OS. Should be used only for testing purposes.