diff options
| author | Quietust | 2012-01-19 22:41:59 -0600 |
|---|---|---|
| committer | Quietust | 2012-01-19 22:41:59 -0600 |
| commit | d35d070ff312e28abedd5fee003db01ef0454b59 (patch) | |
| tree | 49009df05e5ed7b87a06c2f90cc9a4106bc8316a /plugins/tubefill.cpp | |
| parent | 7da633b6ef428354e8635c55a8e036996a18831b (diff) | |
| download | dfhack-d35d070ff312e28abedd5fee003db01ef0454b59.tar.gz dfhack-d35d070ff312e28abedd5fee003db01ef0454b59.tar.bz2 dfhack-d35d070ff312e28abedd5fee003db01ef0454b59.tar.xz | |
Only skip refilling tiles beneath non-featstone tiles if said tiles don't already have floors; also skip tiles filled with liquid
Diffstat (limited to 'plugins/tubefill.cpp')
| -rw-r--r-- | plugins/tubefill.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/tubefill.cpp b/plugins/tubefill.cpp index 32ee3f48..114b786f 100644 --- a/plugins/tubefill.cpp +++ b/plugins/tubefill.cpp @@ -82,18 +82,24 @@ DFhackCExport command_result tubefill(DFHack::Core * c, std::vector<std::string> 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; |
