Import remove all trees in scenario editor patch.
http://www.tt-forums.net/viewtopic.php?f=33&t=49326 Update to current current version. Use CMD_LANDSCAPE_CLEAR instead of CMD_CLEAR_AREA. Whitespace, misc fixes.
This commit is contained in:

committed by
Jonathan G Rennison

parent
2c9029703b
commit
2e04f211df
@@ -356,6 +356,24 @@ void PlaceTreesRandomly()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all trees
|
||||
*
|
||||
* This function remove all trees on the map.
|
||||
*/
|
||||
void RemoveAllTrees()
|
||||
{
|
||||
for(uint i = 0; i < MapSizeX(); i++) {
|
||||
for(uint j = 0; j < MapSizeY(); j++) {
|
||||
TileIndex tile = TileXY(i, j);
|
||||
if(GetTileType(tile) == MP_TREES) {
|
||||
DoCommandP(tile, 0, 0, CMD_LANDSCAPE_CLEAR | CMD_MSG(STR_ERROR_CAN_T_CLEAR_THIS_AREA), CcPlaySound10);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Place new trees.
|
||||
*
|
||||
|
Reference in New Issue
Block a user