|
|
@ -503,6 +503,9 @@ static int burrow_tiles_box_remove(lua_State *L) {
|
|
|
|
|
|
|
|
|
|
|
|
// ramp tops inherit walkability group of the tile below
|
|
|
|
// ramp tops inherit walkability group of the tile below
|
|
|
|
static uint16_t get_walk_group(const df::coord & pos) {
|
|
|
|
static uint16_t get_walk_group(const df::coord & pos) {
|
|
|
|
|
|
|
|
df::tile_designation *des = Maps::getTileDesignation(pos);
|
|
|
|
|
|
|
|
if (!des || des->bits.hidden)
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
uint16_t walk = Maps::getWalkableGroup(pos);
|
|
|
|
uint16_t walk = Maps::getWalkableGroup(pos);
|
|
|
|
if (walk)
|
|
|
|
if (walk)
|
|
|
|
return walk;
|
|
|
|
return walk;
|
|
|
@ -578,9 +581,9 @@ static void flood_fill(lua_State *L, bool enable) {
|
|
|
|
++pos_above.z;
|
|
|
|
++pos_above.z;
|
|
|
|
df::tiletype *tt = Maps::getTileType(pos);
|
|
|
|
df::tiletype *tt = Maps::getTileType(pos);
|
|
|
|
df::tiletype *tt_above = Maps::getTileType(pos_above);
|
|
|
|
df::tiletype *tt_above = Maps::getTileType(pos_above);
|
|
|
|
if (tt_above && LowPassable(*tt_above))
|
|
|
|
if (tt_above && (!start_walk || LowPassable(*tt_above)))
|
|
|
|
flood.emplace(pos_above);
|
|
|
|
flood.emplace(pos_above);
|
|
|
|
if (tt && LowPassable(*tt))
|
|
|
|
if (tt && (!start_walk || LowPassable(*tt)))
|
|
|
|
flood.emplace(pos.x, pos.y, pos.z-1);
|
|
|
|
flood.emplace(pos.x, pos.y, pos.z-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|