From d7d4f364ac8f3e9e6e42f9550d31122a0331b41c Mon Sep 17 00:00:00 2001 From: myk002 Date: Fri, 1 Oct 2021 21:32:31 -0700 Subject: [PATCH] channel over dig equals no ramp fixes special case where a channel tile is specified over a regular dig tile. this allows dig-now to produce a flat floor in that case, which is likely what is intended. --- plugins/dig-now.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/dig-now.cpp b/plugins/dig-now.cpp index 788631990..15842557d 100644 --- a/plugins/dig-now.cpp +++ b/plugins/dig-now.cpp @@ -345,11 +345,13 @@ static bool dig_tile(color_ostream &out, MapExtras::MapCache &map, DFCoord pos_above(pos.x, pos.y, pos.z+1); if (map.ensureBlockAt(pos_above)) remove_ramp_top(map, pos_above); + df::tile_dig_designation td_below = + map.designationAt(pos_below).bits.dig; if (dig_tile(out, map, pos_below, df::tile_dig_designation::Ramp, dug_tiles)) { clean_ramps(map, pos_below); - // if we successfully dug out the ramp below, that took care - // of adding the ramp top here + if (td_below == df::tile_dig_designation::Default) + dig_tile(out, map, pos_below, td_below, dug_tiles); return true; } }