From d35d070ff312e28abedd5fee003db01ef0454b59 Mon Sep 17 00:00:00 2001 From: Quietust Date: Thu, 19 Jan 2012 22:41:59 -0600 Subject: [PATCH] Only skip refilling tiles beneath non-featstone tiles if said tiles don't already have floors; also skip tiles filled with liquid --- plugins/tubefill.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/tubefill.cpp b/plugins/tubefill.cpp index 32ee3f484..114b786f9 100644 --- a/plugins/tubefill.cpp +++ b/plugins/tubefill.cpp @@ -82,18 +82,24 @@ DFhackCExport command_result tubefill(DFHack::Core * c, std::vector if (tileShape(block->tiletype[x][y]) == WALL) continue; + // Does the tile contain liquid? + if (block->designation[x][y].bits.flow_size) + continue; + // Set current tile, as accurately as can be expected // block->tiletype[x][y] = findSimilarTileType(block->tiletype[x][y], WALL); // Check the tile above this one, in case we need to add a floor if (above) { - // if this tile isn't a local feature, it's likely the tile underneath was originally just a floor - // it's also possible there was just solid non-feature stone above, but we don't care enough to check - if (!above->designation[x][y].bits.feature_local) - continue; if ((tileShape(above->tiletype[x][y]) == EMPTY) || (tileShape(above->tiletype[x][y]) == RAMP_TOP)) + { + // if this tile isn't a local feature, it's likely the tile underneath was originally just a floor + // it's also possible there was just solid non-feature stone above, but we don't care enough to check + if (!above->designation[x][y].bits.feature_local) + continue; above->tiletype[x][y] = findTileType(FLOOR, FEATSTONE, tilevariant_invalid, TILE_NORMAL, TileDirection()); + } } block->tiletype[x][y] = findTileType(WALL, FEATSTONE, tilevariant_invalid, TILE_NORMAL, TileDirection()); ++count;