| 127 | } |
| 128 | |
| 129 | void DoPlantForest(TileIndex tile) |
| 130 | { |
| 131 | TreeType treetype = (TreeType)this->tree_to_plant; |
| 132 | if (this->tree_to_plant == TREE_INVALID) { |
| 133 | treetype = (TreeType)(InteractiveRandomRange(_tree_count_by_landscape[to_underlying(_settings_game.game_creation.landscape)]) + _tree_base_by_landscape[to_underlying(_settings_game.game_creation.landscape)]); |
| 134 | } |
| 135 | const uint radius = this->mode == PM_FOREST_LG ? 12 : 5; |
| 136 | const uint count = this->mode == PM_FOREST_LG ? 12 : 5; |
| 137 | /* Create tropic zones only when the tree type is selected by the user and not picked randomly. */ |
| 138 | PlaceTreeGroupAroundTile(tile, treetype, radius, count, this->tree_to_plant != TREE_INVALID); |
| 139 | } |
| 140 | |
| 141 | public: |
| 142 | BuildTreesWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc) |
no test coverage detected