From 59a34c6d178b34b652dd195e838994567db72f29 Mon Sep 17 00:00:00 2001 From: myk002 Date: Sat, 19 Jun 2021 12:00:13 -0700 Subject: [PATCH] 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) --- plugins/dig-now.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/dig-now.cpp b/plugins/dig-now.cpp index 10babd5c9..e3146bcc8 100644 --- a/plugins/dig-now.cpp +++ b/plugins/dig-now.cpp @@ -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,