| 22 | REQUIRE_GLOBAL(world); |
| 23 | |
| 24 | static void doDeramp(df::map_block* block, df::map_block* above, int x, int y, df::tiletype oldT) |
| 25 | { |
| 26 | // Current tile is a ramp. |
| 27 | // Set current tile, as accurately as can be expected |
| 28 | df::tiletype newT = findSimilarTileType(oldT, tiletype_shape::FLOOR); |
| 29 | |
| 30 | // If no change, skip it (couldn't find a good tile type) |
| 31 | if (oldT == newT) |
| 32 | return; |
| 33 | // Set new tile type, clear designation |
| 34 | block->tiletype[x][y] = newT; |
| 35 | block->designation[x][y].bits.dig = tile_dig_designation::No; |
| 36 | |
| 37 | // Check the tile above this one, in case a downward slope needs to be removed. |
| 38 | if ((above) && (tileShape(above->tiletype[x][y]) == tiletype_shape::RAMP_TOP)) |
| 39 | above->tiletype[x][y] = tiletype::OpenSpace; // open space |
| 40 | } |
| 41 | |
| 42 | command_result df_deramp (color_ostream &out, vector <string> & parameters) |
| 43 | { |
no test coverage detected