1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 16:39:43 +00:00

FEAT: Add organic/respawning flags to containers

This commit is contained in:
Dave Corley 2024-06-24 03:11:01 -05:00
parent daada262d7
commit fccf75377d
3 changed files with 7 additions and 1 deletions

View file

@ -246,6 +246,7 @@
Feature #7964: Add Lua read access to MW Dialogue records
Feature #7971: Make save's Time Played value display hours instead of days
Feature #7985: Support dark mode on Windows
Feature #8034: (Lua) Containers should have respawning/organic flags
Task #5896: Do not use deprecated MyGUI properties
Task #6085: Replace boost::filesystem with std::filesystem
Task #6149: Dehardcode Lua API_REVISION

View file

@ -54,5 +54,9 @@ namespace MWLua
record["mwscript"] = sol::readonly_property(
[](const ESM::Container& rec) -> std::string { return rec.mScript.serializeText(); });
record["weight"] = sol::readonly_property([](const ESM::Container& rec) -> float { return rec.mWeight; });
record["organic"] = sol::readonly_property(
[](const ESM::Container& rec) -> bool { return rec.mFlags & ESM::Container::Organic; });
record["respawns"] = sol::readonly_property(
[](const ESM::Container& rec) -> bool { return rec.mFlags & ESM::Container::Respawn; });
}
}

View file

@ -2109,7 +2109,8 @@
-- @field #string model VFS path to the model
-- @field #string mwscript MWScript on this container (can be empty)
-- @field #number weight capacity of this container
-- @field #boolean organic Whether items can be placed in the container
-- @field #boolean respawns Whether the container respawns its contents
--------------------------------------------------------------------------------
-- @{#Door} functions