1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-28 12:40:06 +00:00

Merge branch 'free_range_containers' into 'master'

FEAT: Add organic/respawning flags to containers (Close #8038)

Closes #8038

See merge request OpenMW/openmw!4205
This commit is contained in:
psi29a 2024-06-29 09:21:12 +00:00
commit 4da35c7e7f
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["isOrganic"] = sol::readonly_property(
[](const ESM::Container& rec) -> bool { return rec.mFlags & ESM::Container::Organic; });
record["isRespawning"] = 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 isOrganic Whether items can be placed in the container
-- @field #boolean isRespawning Whether the container respawns its contents
--------------------------------------------------------------------------------
-- @{#Door} functions