remove ramp tops when channeling

we normally take care of any ramp tops above the channeled tile when we dig the ramp below the channeled
tile, but that logic might not run if we channel down into empty space
(or undiggable tiles)
develop
myk002 2021-06-19 12:00:13 -07:00
parent 662f2cc616
commit 59a34c6d17
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 3 additions and 0 deletions

@ -336,6 +336,9 @@ static bool dig_tile(color_ostream &out, MapExtras::MapCache &map,
case df::tile_dig_designation::Channel:
if (can_dig_channel(tt)) {
target_type = df::tiletype::OpenSpace;
DFCoord pos_above(pos.x, pos.y, pos.z+1);
if (map.ensureBlockAt(pos_above))
remove_ramp_top(map, pos_above);
DFCoord pos_below(pos.x, pos.y, pos.z-1);
if (map.ensureBlockAt(pos_below) &&
dig_tile(out, map, pos_below,