if pos is empty space, teleport to a floor somewhere below if we fall out of the world (e.g. empty space or walls all the way down), returned position will be invalid
| 835 | // if we fall out of the world (e.g. empty space or walls all the way down), |
| 836 | // returned position will be invalid |
| 837 | static DFCoord simulate_fall(const DFCoord &pos) { |
| 838 | DFCoord resting_pos(pos); |
| 839 | |
| 840 | while (Maps::ensureTileBlock(resting_pos)) { |
| 841 | df::tiletype tt = *Maps::getTileType(resting_pos); |
| 842 | if (isWalkable(tt)) |
| 843 | break; |
| 844 | --resting_pos.z; |
| 845 | } |
| 846 | |
| 847 | return resting_pos; |
| 848 | } |
| 849 | |
| 850 | static void create_boulders(color_ostream &out, |
| 851 | const item_coords_t &item_coords, |
no test coverage detected