| 410 | } |
| 411 | |
| 412 | static void set_tt(const df::coord &pos) |
| 413 | { // Set tiletype to grass or soil floor |
| 414 | auto block = Maps::getTileBlock(pos); |
| 415 | if (!block) |
| 416 | return; |
| 417 | |
| 418 | int tx = pos.x & 15, ty = pos.y & 15; |
| 419 | if (has_grass(block, tx, ty)) |
| 420 | block->tiletype[tx][ty] = findRandomVariant((rand() & 1) ? tiletype::GrassLightFloor1 : tiletype::GrassDarkFloor1); |
| 421 | else |
| 422 | block->tiletype[tx][ty] = findRandomVariant(tiletype::SoilFloor1); |
| 423 | } |
| 424 | |
| 425 | command_result df_removeplant(color_ostream &out, const cuboid &bounds, const plant_options &options, vector<int32_t> *filter = nullptr) |
| 426 | { |
no test coverage detected