diff options
| author | Alexander Gavrilov | 2012-09-02 14:10:58 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-09-02 14:10:58 +0400 |
| commit | 3713c5ea9eaab262be1d08a92781f62bbb6cf95a (patch) | |
| tree | 473208e4f48d20b52d12be37491ef1bf9b78a92b /library/LuaApi.cpp | |
| parent | febfc9aa5b87928432060c9c55f2710a2a6201cc (diff) | |
| download | dfhack-3713c5ea9eaab262be1d08a92781f62bbb6cf95a.tar.gz dfhack-3713c5ea9eaab262be1d08a92781f62bbb6cf95a.tar.bz2 dfhack-3713c5ea9eaab262be1d08a92781f62bbb6cf95a.tar.xz | |
Add some APIs required by steam engine to the core.
Diffstat (limited to 'library/LuaApi.cpp')
| -rw-r--r-- | library/LuaApi.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index 6dfb2f35..4e57b113 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -78,6 +78,7 @@ distribution. #include "df/burrow.h" #include "df/building_civzonest.h" #include "df/region_map_entry.h" +#include "df/flow_info.h" #include <lua.h> #include <lauxlib.h> @@ -756,7 +757,9 @@ static const LuaWrapper::FunctionReg dfhack_gui_module[] = { WRAPM(Gui, getSelectedUnit), WRAPM(Gui, getSelectedItem), WRAPM(Gui, showAnnouncement), + WRAPM(Gui, showZoomAnnouncement), WRAPM(Gui, showPopupAnnouncement), + WRAPM(Gui, showAutoAnnouncement), { NULL, NULL } }; @@ -912,9 +915,17 @@ static const LuaWrapper::FunctionReg dfhack_maps_module[] = { WRAPM(Maps, getGlobalInitFeature), WRAPM(Maps, getLocalInitFeature), WRAPM(Maps, canWalkBetween), + WRAPM(Maps, spawnFlow), { NULL, NULL } }; +static int maps_isValidTilePos(lua_State *L) +{ + auto pos = CheckCoordXYZ(L, 1, true); + lua_pushboolean(L, Maps::isValidTilePos(pos)); + return 1; +} + static int maps_getTileBlock(lua_State *L) { auto pos = CheckCoordXYZ(L, 1, true); @@ -936,6 +947,7 @@ static int maps_getTileBiomeRgn(lua_State *L) } static const luaL_Reg dfhack_maps_funcs[] = { + { "isValidTilePos", maps_isValidTilePos }, { "getTileBlock", maps_getTileBlock }, { "getRegionBiome", maps_getRegionBiome }, { "getTileBiomeRgn", maps_getTileBiomeRgn }, |
