forked from mirror/OpenTTD
Codechange: refactor removal of desert around river tiles
This commit is contained in:
@@ -427,6 +427,18 @@ bool RiverModifyDesertZone(TileIndex tile, void *)
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a river tile and remove desert directly around it.
|
||||
* @param tile The tile to change into river and create non-desert around
|
||||
*/
|
||||
void MakeRiverAndModifyDesertZoneAround(TileIndex tile) {
|
||||
MakeRiver(tile, Random());
|
||||
MarkTileDirtyByTile(tile);
|
||||
|
||||
/* Remove desert directly around the river tile. */
|
||||
CircularTileSearch(&tile, RIVER_OFFSET_DESERT_DISTANCE, RiverModifyDesertZone, nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a piece of canal.
|
||||
* @param flags type of operation
|
||||
|
Reference in New Issue
Block a user