| 716 | } |
| 717 | |
| 718 | static CommandCost ClearTile_Trees(TileIndex tile, DoCommandFlags flags) |
| 719 | { |
| 720 | uint num; |
| 721 | |
| 722 | if (Company::IsValidID(_current_company)) { |
| 723 | Town *t = ClosestTownFromTile(tile, _settings_game.economy.dist_local_authority); |
| 724 | if (t != nullptr) ChangeTownRating(t, RATING_TREE_DOWN_STEP, RATING_TREE_MINIMUM, flags); |
| 725 | } |
| 726 | |
| 727 | num = GetTreeCount(tile); |
| 728 | if (IsInsideMM(GetTreeType(tile), TREE_RAINFOREST, TREE_CACTUS)) num *= 4; |
| 729 | |
| 730 | if (flags.Test(DoCommandFlag::Execute)) DoClearSquare(tile); |
| 731 | |
| 732 | return CommandCost(EXPENSES_CONSTRUCTION, num * _price[PR_CLEAR_TREES]); |
| 733 | } |
| 734 | |
| 735 | static void GetTileDesc_Trees(TileIndex tile, TileDesc &td) |
| 736 | { |
nothing calls this directly
no test coverage detected