summaryrefslogtreecommitdiff
path: root/library/LuaApi.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-05-01 19:55:25 +0400
committerAlexander Gavrilov2012-05-01 19:55:25 +0400
commiteadce959408a7b1811bd158e4d5cb74e57b671e6 (patch)
tree4db630222630c1212d319b052c2278b78f8f351f /library/LuaApi.cpp
parent4cffb6428d5e25b0c3cb09044f65dbf5d43667e9 (diff)
downloaddfhack-eadce959408a7b1811bd158e4d5cb74e57b671e6.tar.gz
dfhack-eadce959408a7b1811bd158e4d5cb74e57b671e6.tar.bz2
dfhack-eadce959408a7b1811bd158e4d5cb74e57b671e6.tar.xz
Add a convenience function for designating constructions.
Diffstat (limited to 'library/LuaApi.cpp')
-rw-r--r--library/LuaApi.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp
index 11cf73c3..0d064718 100644
--- a/library/LuaApi.cpp
+++ b/library/LuaApi.cpp
@@ -48,6 +48,7 @@ distribution.
#include "modules/MapCache.h"
#include "modules/Burrows.h"
#include "modules/Buildings.h"
+#include "modules/Constructions.h"
#include "LuaWrapper.h"
#include "LuaTools.h"
@@ -766,6 +767,7 @@ static const luaL_Reg dfhack_burrows_funcs[] = {
/***** Buildings module *****/
static const LuaWrapper::FunctionReg dfhack_buildings_module[] = {
+ WRAPM(Buildings, findAtTile),
WRAPM(Buildings, allocInstance),
WRAPM(Buildings, checkFreeTiles),
WRAPM(Buildings, countExtentTiles),
@@ -822,6 +824,14 @@ static const luaL_Reg dfhack_buildings_funcs[] = {
{ NULL, NULL }
};
+/***** Constructions module *****/
+
+static const LuaWrapper::FunctionReg dfhack_constructions_module[] = {
+ WRAPM(Constructions, designateNew),
+ { NULL, NULL }
+};
+
+
/************************
* Main Open function *
************************/
@@ -839,4 +849,5 @@ void OpenDFHackApi(lua_State *state)
OpenModule(state, "maps", dfhack_maps_module, dfhack_maps_funcs);
OpenModule(state, "burrows", dfhack_burrows_module, dfhack_burrows_funcs);
OpenModule(state, "buildings", dfhack_buildings_module, dfhack_buildings_funcs);
+ OpenModule(state, "constructions", dfhack_constructions_module);
}