[Lua] Ability to distinguish normal interiors and quasi exteriors (like Mournhold).

just_say_no_to_geode
Petr Mikheev 3 years ago
parent c3599ada2e
commit 377c00261a

@ -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…
Cancel
Save