diff options
| author | Alexander Gavrilov | 2012-09-06 22:45:19 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-09-06 22:45:19 +0400 |
| commit | c971a819def1c5cc29dc926f62456c336a1dfa17 (patch) | |
| tree | a03b4fd14884603b15a5e96609408603c6566b12 /library/LuaApi.cpp | |
| parent | d0e630d4c35717bad682894e33e7dd57f86ac126 (diff) | |
| download | dfhack-c971a819def1c5cc29dc926f62456c336a1dfa17.tar.gz dfhack-c971a819def1c5cc29dc926f62456c336a1dfa17.tar.bz2 dfhack-c971a819def1c5cc29dc926f62456c336a1dfa17.tar.xz | |
Experimental creation of map blocks in gui/liquids script.
Diffstat (limited to 'library/LuaApi.cpp')
| -rw-r--r-- | library/LuaApi.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index 1dcb001f..63838d35 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -935,6 +935,13 @@ static int maps_getTileBlock(lua_State *L) return 1; } +static int maps_ensureTileBlock(lua_State *L) +{ + auto pos = CheckCoordXYZ(L, 1, true); + Lua::PushDFObject(L, Maps::ensureTileBlock(pos)); + return 1; +} + static int maps_getRegionBiome(lua_State *L) { auto pos = CheckCoordXY(L, 1, true); @@ -951,6 +958,7 @@ static int maps_getTileBiomeRgn(lua_State *L) static const luaL_Reg dfhack_maps_funcs[] = { { "isValidTilePos", maps_isValidTilePos }, { "getTileBlock", maps_getTileBlock }, + { "ensureTileBlock", maps_ensureTileBlock }, { "getRegionBiome", maps_getRegionBiome }, { "getTileBiomeRgn", maps_getTileBiomeRgn }, { NULL, NULL } |
