diff options
| author | Alexander Gavrilov | 2012-05-06 19:09:11 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-05-06 19:09:11 +0400 |
| commit | 9ad8d767b4fcf0946444469d2c4072d46997b7e6 (patch) | |
| tree | f49a082895fe73d400e64359e859806c173d00ef /library/LuaApi.cpp | |
| parent | b70130cf3684d8adbf36023b27aec0f10b213cc7 (diff) | |
| download | dfhack-9ad8d767b4fcf0946444469d2c4072d46997b7e6.tar.gz dfhack-9ad8d767b4fcf0946444469d2c4072d46997b7e6.tar.bz2 dfhack-9ad8d767b4fcf0946444469d2c4072d46997b7e6.tar.xz | |
Add code for adding abstract buildings and removing constructions.
Diffstat (limited to 'library/LuaApi.cpp')
| -rw-r--r-- | library/LuaApi.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index bf2ec936..d554754e 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -821,8 +821,10 @@ static const LuaWrapper::FunctionReg dfhack_buildings_module[] = { WRAPM(Buildings, countExtentTiles), WRAPN(containsTile, buildings_containsTile), WRAPM(Buildings, hasSupport), + WRAPM(Buildings, constructAbstract), WRAPM(Buildings, constructWithItems), WRAPM(Buildings, constructWithFilters), + WRAPM(Buildings, deconstruct), { NULL, NULL } }; @@ -900,6 +902,20 @@ static const LuaWrapper::FunctionReg dfhack_constructions_module[] = { { NULL, NULL } }; +static int constructions_designateRemove(lua_State *L) +{ + auto pos = CheckCoordXYZ(L, 1, true); + bool imm = false; + lua_pushboolean(L, Constructions::designateRemove(pos, &imm)); + lua_pushboolean(L, imm); + return 2; +} + +static const luaL_Reg dfhack_constructions_funcs[] = { + { "designateRemove", constructions_designateRemove }, + { NULL, NULL } +}; + /************************ * Main Open function * |
