mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-17 20:42:29 +00:00
Expose governing attributes to Lua
This commit is contained in:
parent
3baefdf29e
commit
a88f0ecc95
@ -454,6 +454,9 @@ namespace MWLua
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
return &*rec.mSchool;
|
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");
|
auto schoolT = context.mLua->sol().new_usertype<ESM::MagicSchool>("MagicSchool");
|
||||||
schoolT[sol::meta_function::to_string]
|
schoolT[sol::meta_function::to_string]
|
||||||
|
@ -862,6 +862,7 @@
|
|||||||
-- @field #string description Human-readable description
|
-- @field #string description Human-readable description
|
||||||
-- @field #string icon VFS path to the icon
|
-- @field #string icon VFS path to the icon
|
||||||
-- @field #MagicSchoolData school Optional magic school
|
-- @field #MagicSchoolData school Optional magic school
|
||||||
|
-- @field #string attribute The id of the skill's governing attribute
|
||||||
|
|
||||||
-- @type MagicSchoolData
|
-- @type MagicSchoolData
|
||||||
-- @field #string name Human-readable name
|
-- @field #string name Human-readable name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user