diff options
| author | Alexander Gavrilov | 2012-04-11 12:01:27 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-04-11 12:01:27 +0400 |
| commit | c7b922250b5e41cb78b8636a706fdc07be615974 (patch) | |
| tree | 2264c4993db36afae51853307505c7572017bf82 /plugins/tubefill.cpp | |
| parent | 59ddbfacb70a8f56e3fa2088ada1df71d8d158de (diff) | |
| download | dfhack-c7b922250b5e41cb78b8636a706fdc07be615974.tar.gz dfhack-c7b922250b5e41cb78b8636a706fdc07be615974.tar.bz2 dfhack-c7b922250b5e41cb78b8636a706fdc07be615974.tar.xz | |
More maps api refactoring and renaming.
getBlockAbs is a very confusing name; getTileBlock is better.
Diffstat (limited to 'plugins/tubefill.cpp')
| -rw-r--r-- | plugins/tubefill.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/tubefill.cpp b/plugins/tubefill.cpp index 0dd04534..0d20136d 100644 --- a/plugins/tubefill.cpp +++ b/plugins/tubefill.cpp @@ -59,12 +59,9 @@ command_result tubefill(color_ostream &out, std::vector<std::string> & params) for (size_t i = 0; i < world->map.map_blocks.size(); i++) { df::map_block *block = world->map.map_blocks[i]; - df::map_block *above = Maps::getBlockAbs(block->map_pos.x, block->map_pos.y, block->map_pos.z + 1); - if (block->local_feature == -1) - continue; + df::map_block *above = Maps::getTileBlock(block->map_pos + df::coord(0,0,1)); DFHack::t_feature feature; - DFCoord coord(block->map_pos.x >> 4, block->map_pos.y >> 4, block->map_pos.z); - if (!Maps::GetLocalFeature(feature, coord, block->local_feature)) + if (!Maps::ReadFeatures(block, &feature, NULL)) continue; if (feature.type != feature_type::deep_special_tube) continue; |
