mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
Merge branch 'lua_hassky' into 'master'
[Lua] Ability to distinguish normal interiors and quasi exteriors (like Mournhold). See merge request OpenMW/openmw!2049
This commit is contained in:
commit
cd484cf082
@ -37,8 +37,12 @@ namespace MWLua
|
||||
cellT["region"] = sol::readonly_property([](const CellT& c) { return c.mStore->getCell()->mRegion; });
|
||||
cellT["gridX"] = sol::readonly_property([](const CellT& c) { return c.mStore->getCell()->getGridX(); });
|
||||
cellT["gridY"] = sol::readonly_property([](const CellT& c) { return c.mStore->getCell()->getGridY(); });
|
||||
cellT["isExterior"] = sol::readonly_property([](const CellT& c) { return c.mStore->isExterior(); });
|
||||
cellT["hasWater"] = sol::readonly_property([](const CellT& c) { return c.mStore->getCell()->hasWater(); });
|
||||
cellT["isExterior"] = sol::readonly_property([](const CellT& c) { return c.mStore->isExterior(); });
|
||||
cellT["isQuasiExterior"] = sol::readonly_property([](const CellT& c)
|
||||
{
|
||||
return c.mStore->getCell()->mData.mFlags & ESM::Cell::QuasiEx;
|
||||
});
|
||||
|
||||
cellT["isInSameSpace"] = [](const CellT& c, const ObjectT& obj)
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ namespace MWLua
|
||||
{
|
||||
auto* lua = context.mLua;
|
||||
sol::table api(lua->sol(), sol::create);
|
||||
api["API_REVISION"] = 25;
|
||||
api["API_REVISION"] = 26;
|
||||
api["quit"] = [lua]()
|
||||
{
|
||||
Log(Debug::Warning) << "Quit requested by a Lua script.\n" << lua->debugTraceback();
|
||||
|
@ -182,7 +182,8 @@
|
||||
-- @type Cell
|
||||
-- @field #string name Name of the cell (can be empty string).
|
||||
-- @field #string region Region of the cell.
|
||||
-- @field #boolean isExterior Is it exterior or interior.
|
||||
-- @field #boolean isExterior Whether the cell is an exterior.
|
||||
-- @field #boolean isQuasiExterior Whether the cell is a quasi exterior (like interior but with the sky and the wheather).
|
||||
-- @field #number gridX Index of the cell by X (only for exteriors).
|
||||
-- @field #number gridY Index of the cell by Y (only for exteriors).
|
||||
-- @field #boolean hasWater True if the cell contains water.
|
||||
|
Loading…
x
Reference in New Issue
Block a user