Codechange: Rename BuildTownHouse to TryBuildTownHouse.

This commit is contained in:
Peter Nelson 2024-05-14 17:29:57 +01:00 committed by Peter Nelson
parent bb77d16e40
commit f901722066
1 changed files with 5 additions and 5 deletions

View File

@ -232,7 +232,7 @@ enum TownGrowthResult {
// GROWTH_SEARCH_RUNNING >= 1
};
static bool BuildTownHouse(Town *t, TileIndex tile);
static bool TryBuildTownHouse(Town *t, TileIndex tile);
static Town *CreateRandomTown(uint attempts, uint32_t townnameparts, TownSize size, bool city, TownLayout layout);
static void TownDrawHouseLift(const TileInfo *ti)
@ -694,7 +694,7 @@ static void TileLoop_Town(TileIndex tile)
}
}
BuildTownHouse(t, tile);
TryBuildTownHouse(t, tile);
}
}
@ -1183,7 +1183,7 @@ static bool GrowTownWithExtraHouse(Town *t, TileIndex tile)
/* If there are enough neighbors stop here */
if (counter >= 3) {
if (BuildTownHouse(t, tile)) {
if (TryBuildTownHouse(t, tile)) {
_grow_town_result = GROWTH_SUCCEED;
return true;
}
@ -1668,7 +1668,7 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t
/* And build a house.
* Set result to -1 if we managed to build it. */
if (BuildTownHouse(t1, house_tile)) {
if (TryBuildTownHouse(t1, house_tile)) {
_grow_town_result = GROWTH_SUCCEED;
}
}
@ -2672,7 +2672,7 @@ static bool CheckTownBuild2x2House(TileIndex *tile, Town *t, int maxz, bool nosl
* @param tile The tile to try building on.
* @return false iff no house can be built on this tile.
*/
static bool BuildTownHouse(Town *t, TileIndex tile)
static bool TryBuildTownHouse(Town *t, TileIndex tile)
{
/* forbidden building here by town layout */
if (!TownLayoutAllowsHouseHere(t, tile)) return false;