From b52ab04c434423dfca44326d8fb3ecbb546e5543 Mon Sep 17 00:00:00 2001 From: Tobias Tribble Date: Wed, 26 Apr 2023 12:01:59 -0500 Subject: [PATCH] Added soulValue to creatureRecord, added documentation --- apps/openmw/mwlua/types/creature.cpp | 1 + files/lua_api/openmw/types.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwlua/types/creature.cpp b/apps/openmw/mwlua/types/creature.cpp index ec4eb07c87..d07138f1c6 100644 --- a/apps/openmw/mwlua/types/creature.cpp +++ b/apps/openmw/mwlua/types/creature.cpp @@ -38,5 +38,6 @@ namespace MWLua [](const ESM::Creature& rec) -> std::string { return rec.mScript.serializeText(); }); record["baseCreature"] = sol::readonly_property( [](const ESM::Creature& rec) -> std::string { return rec.mOriginal.serializeText(); }); + record["soulValue"] = sol::readonly_property([](const ESM::Creature& rec) -> int { return rec.mData.mSoul; }); } } diff --git a/files/lua_api/openmw/types.lua b/files/lua_api/openmw/types.lua index 2ac02c1456..05224bb5c8 100644 --- a/files/lua_api/openmw/types.lua +++ b/files/lua_api/openmw/types.lua @@ -518,7 +518,7 @@ -- @field #string baseCreature Record id of a base creature, which was modified to create this one -- @field #string model VFS path to the creature's model -- @field #string mwscript - +-- @field #string soulValue The soul value of the creature record --- @{#NPC} functions