expose link_adjacent_smooth_walls to lua

so build-now can use it
develop
myk002 2021-07-10 14:51:21 -07:00
parent 8fb456313f
commit 79bdf36ed4
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 17 additions and 0 deletions

@ -897,7 +897,24 @@ static int dig_now_tile(lua_State *L)
return 1;
}
static int link_adjacent_smooth_walls(lua_State *L)
{
DFCoord pos;
if (lua_gettop(L) <= 1)
Lua::CheckDFAssign(L, &pos, 1);
else
pos = DFCoord(luaL_checkint(L, 1), luaL_checkint(L, 2),
luaL_checkint(L, 3));
MapExtras::MapCache map;
adjust_smooth_wall_dir(map, pos);
refresh_adjacent_smooth_walls(map, pos);
map.WriteAll();
return 0;
}
DFHACK_PLUGIN_LUA_COMMANDS {
DFHACK_LUA_COMMAND(dig_now_tile),
DFHACK_LUA_COMMAND(link_adjacent_smooth_walls),
DFHACK_LUA_END
};