File diff r11230:fd38dc6041aa → r11231:db031b23683b
src/town_cmd.cpp
Show inline comments
 
@@ -815,23 +815,23 @@ no_slope:
 
		return true;
 
	}
 
}
 

	
 
static bool TerraformTownTile(TileIndex tile, int edges, int dir)
 
{
 
	TILE_ASSERT(tile);
 
	assert(tile < MapSize());
 

	
 
	CommandCost r = DoCommand(tile, edges, dir, DC_AUTO | DC_NO_WATER, CMD_TERRAFORM_LAND);
 
	if (CmdFailed(r) || r.GetCost() >= (_price.terraform + 2) * 8) return false;
 
	DoCommand(tile, edges, dir, DC_AUTO | DC_NO_WATER | DC_EXEC, CMD_TERRAFORM_LAND);
 
	return true;
 
}
 

	
 
static void LevelTownLand(TileIndex tile)
 
{
 
	TILE_ASSERT(tile);
 
	assert(tile < MapSize());
 

	
 
	/* Don't terraform if land is plain or if there's a house there. */
 
	if (IsTileType(tile, MP_HOUSE)) return;
 
	Slope tileh = GetTileSlope(tile, NULL);
 
	if (tileh == SLOPE_FLAT) return;
 

	
 
@@ -1024,13 +1024,13 @@ static bool GrowTownWithBridge(const Tow
 
 */
 
static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection target_dir, Town *t1)
 
{
 
	RoadBits rcmd = ROAD_NONE;  // RoadBits for the road construction command
 
	TileIndex tile = *tile_ptr; // The main tile on which we base our growth
 

	
 
	TILE_ASSERT(tile);
 
	assert(tile < MapSize());
 

	
 
	if (cur_rb == ROAD_NONE) {
 
		/* Tile has no road. First reset the status counter
 
		 * to say that this is the last iteration. */
 
		_grow_town_result = GROWTH_SEARCH_STOPPED;
 

	
 
@@ -1192,13 +1192,13 @@ static int GrowTownAtRoad(Town *t, TileI
 
{
 
	/* Special case.
 
	 * @see GrowTownInTile Check the else if
 
	 */
 
	DiagDirection target_dir = DIAGDIR_END; // The direction in which we want to extend the town
 

	
 
	TILE_ASSERT(tile);
 
	assert(tile < MapSize());
 

	
 
	/* Number of times to search.
 
	 * Better roads, 2X2 and 3X3 grid grow quite fast so we give
 
	 * them a little handicap. */
 
	switch (t->layout) {
 
		case TL_BETTER_ROADS: