remove designations from all modified tiles

found this bug with blueprint-generated blueprints. if both a channel
and the resulting ramp are explicitly marked in the blueprint (like the
blueprint plugin does), the channel is processed first, pre-creating the
ramp in the tile designated for a ramp. Then, when the ramp designation
is processed, the ramp is already there, which is an invalid tile to
make a ramp on, so the designation is skipped (and therefore not
cleared). this change clears the designation for both the ramp tile and
the channel tile when either is processed. this opens another edge case
where the designation under a channel is a regular 'd' mine, which will
now get ignored and leave a ramp insead of a flat floor. but I'll
address that in the next commit.
develop
myk002 2021-10-01 11:21:55 -07:00 committed by Myk
parent 1a11c43546
commit 42f4cbdc9c
1 changed files with 4 additions and 3 deletions

@ -597,10 +597,11 @@ static void do_dig(color_ostream &out, std::vector<DFCoord> &dug_coords,
!to.bits.dig_marked) {
std::vector<dug_tile_info> dug_tiles;
if (dig_tile(out, map, pos, td.bits.dig, dug_tiles)) {
td = map.designationAt(pos);
td.bits.dig = df::tile_dig_designation::No;
map.setDesignationAt(pos, td);
for (auto info : dug_tiles) {
td = map.designationAt(info.pos);
td.bits.dig = df::tile_dig_designation::No;
map.setDesignationAt(info.pos, td);
dug_coords.push_back(info.pos);
refresh_adjacent_smooth_walls(map, info.pos);
if (info.imat < 0)