Update LuaApi.cpp

develop
Ryan Williams 2021-06-22 20:05:45 -07:00 committed by GitHub
parent b64e28253f
commit bc841f595e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

@ -1923,6 +1923,13 @@ static int maps_getTileBiomeRgn(lua_State *L)
return Lua::PushPosXY(L, Maps::getTileBiomeRgn(pos));
}
static int maps_getPlantAtCoords(lua_State *L)
{
auto pos = CheckCoordXYZ(L, 1, true);
Lua::PushDFObject(L, Maps::getPlantAtCoords(pos));
return 1;
}
static const luaL_Reg dfhack_maps_funcs[] = {
{ "isValidTilePos", maps_isValidTilePos },
{ "isTileVisible", maps_isTileVisible },
@ -1932,6 +1939,7 @@ static const luaL_Reg dfhack_maps_funcs[] = {
{ "getTileFlags", maps_getTileFlags },
{ "getRegionBiome", maps_getRegionBiome },
{ "getTileBiomeRgn", maps_getTileBiomeRgn },
{ "getPlantAtCoords", maps_getPlantAtCoords },
{ NULL, NULL }
};