1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00

Merge branch 'govna' into 'master'

Expose governing attributes to Lua

See merge request OpenMW/openmw!3556
This commit is contained in:
jvoisin 2023-11-05 16:35:27 +00:00
commit e4c5c1bc43
2 changed files with 4 additions and 0 deletions

View File

@ -454,6 +454,9 @@ namespace MWLua
return nullptr;
return &*rec.mSchool;
});
skillT["attribute"] = sol::readonly_property([](const ESM::Skill& rec) -> std::string {
return ESM::Attribute::indexToRefId(rec.mData.mAttribute).serializeText();
});
auto schoolT = context.mLua->sol().new_usertype<ESM::MagicSchool>("MagicSchool");
schoolT[sol::meta_function::to_string]

View File

@ -862,6 +862,7 @@
-- @field #string description Human-readable description
-- @field #string icon VFS path to the icon
-- @field #MagicSchoolData school Optional magic school
-- @field #string attribute The id of the skill's governing attribute
-- @type MagicSchoolData
-- @field #string name Human-readable name