forked from mirror/OpenTTD
Cleanup: Fix various spelling errors
This commit is contained in:
committed by
rubidium42
parent
4d0682d034
commit
d06b371254
@@ -573,13 +573,13 @@ static void TownGenerateCargoOriginal(Town *t, TownProductionEffect tpe, uint8_t
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate cargo for a house using the binominal algorithm.
|
||||
* Generate cargo for a house using the binomial algorithm.
|
||||
* @param t The current town.
|
||||
* @param tpe The town production effect.
|
||||
* @param rate The town's product rate for this production.
|
||||
* @param stations Available stations for this house.
|
||||
*/
|
||||
static void TownGenerateCargoBinominal(Town *t, TownProductionEffect tpe, uint8_t rate, StationFinder &stations)
|
||||
static void TownGenerateCargoBinomial(Town *t, TownProductionEffect tpe, uint8_t rate, StationFinder &stations)
|
||||
{
|
||||
for (const CargoSpec *cs : CargoSpec::town_production_cargoes[tpe]) {
|
||||
CargoType cargo_type = cs->Index();
|
||||
@@ -659,8 +659,8 @@ static void TileLoop_Town(TileIndex tile)
|
||||
/* Reduce generation rate to a 1/4, using tile bits to spread out distribution.
|
||||
* As tick counter is incremented by 256 between each call, we ignore the lower 8 bits. */
|
||||
if (GB(TimerGameTick::counter, 8, 2) == GB(tile.base(), 0, 2)) {
|
||||
TownGenerateCargoBinominal(t, TPE_PASSENGERS, hs->population, stations);
|
||||
TownGenerateCargoBinominal(t, TPE_MAIL, hs->mail_generation, stations);
|
||||
TownGenerateCargoBinomial(t, TPE_PASSENGERS, hs->population, stations);
|
||||
TownGenerateCargoBinomial(t, TPE_MAIL, hs->mail_generation, stations);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1038,7 +1038,7 @@ bool CheckTownRoadTypes()
|
||||
* @param dist_multi The distance multiplier.
|
||||
* @return true if there is a parallel road.
|
||||
*/
|
||||
static bool IsNeighborRoadTile(TileIndex tile, const DiagDirection dir, uint dist_multi)
|
||||
static bool IsNeighbourRoadTile(TileIndex tile, const DiagDirection dir, uint dist_multi)
|
||||
{
|
||||
if (!IsValidTile(tile)) return false;
|
||||
|
||||
@@ -1092,7 +1092,7 @@ static bool IsRoadAllowedHere(Town *t, TileIndex tile, DiagDirection dir)
|
||||
}
|
||||
|
||||
Slope cur_slope = _settings_game.construction.build_on_slopes ? std::get<0>(GetFoundationSlope(tile)) : GetTileSlope(tile);
|
||||
bool ret = !IsNeighborRoadTile(tile, dir, t->layout == TL_ORIGINAL ? 1 : 2);
|
||||
bool ret = !IsNeighbourRoadTile(tile, dir, t->layout == TL_ORIGINAL ? 1 : 2);
|
||||
if (cur_slope == SLOPE_FLAT) return ret;
|
||||
|
||||
/* If the tile is not a slope in the right direction, then
|
||||
@@ -1200,7 +1200,7 @@ static RoadBits GetTownRoadGridElement(Town *t, TileIndex tile, DiagDirection di
|
||||
|
||||
/**
|
||||
* Grows the town with an extra house.
|
||||
* Check if there are enough neighbor house tiles
|
||||
* Check if there are enough neighbour house tiles
|
||||
* next to the current tile. If there are enough
|
||||
* add another house.
|
||||
*
|
||||
@@ -1213,7 +1213,7 @@ static bool GrowTownWithExtraHouse(Town *t, TileIndex tile)
|
||||
/* We can't look further than that. */
|
||||
if (DistanceFromEdge(tile) == 0) return false;
|
||||
|
||||
uint counter = 0; // counts the house neighbor tiles
|
||||
uint counter = 0; // counts the house neighbour tiles
|
||||
|
||||
/* Check the tiles E,N,W and S of the current tile for houses */
|
||||
for (DiagDirection dir = DIAGDIR_BEGIN; dir < DIAGDIR_END; dir++) {
|
||||
@@ -1230,7 +1230,7 @@ static bool GrowTownWithExtraHouse(Town *t, TileIndex tile)
|
||||
break;
|
||||
}
|
||||
|
||||
/* If there are enough neighbors stop here */
|
||||
/* If there are enough neighbours stop here */
|
||||
if (counter >= 3) {
|
||||
if (TryBuildTownHouse(t, tile)) {
|
||||
_grow_town_result = GROWTH_SUCCEED;
|
||||
@@ -1995,7 +1995,7 @@ void UpdateTownRadius(Town *t)
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the maximum amount of montly passengers and mail for a town, based on its population.
|
||||
* Update the maximum amount of monthly passengers and mail for a town, based on its population.
|
||||
* @param t The town to update.
|
||||
*/
|
||||
void UpdateTownMaxPass(Town *t)
|
||||
@@ -2934,7 +2934,7 @@ CommandCost CmdPlaceHouse(DoCommandFlag flags, TileIndex tile, HouseID house, bo
|
||||
if (hs->building_flags.Test(BuildingFlag::Size2x1)) ta.Add(TileAddByDiagDir(tile, DIAGDIR_SW));
|
||||
if (hs->building_flags.Test(BuildingFlag::Size1x2)) ta.Add(TileAddByDiagDir(tile, DIAGDIR_SE));
|
||||
|
||||
/* Check additonal tiles covered by this house. */
|
||||
/* Check additional tiles covered by this house. */
|
||||
for (const TileIndex &subtile : ta) {
|
||||
cost = Command<CMD_LANDSCAPE_CLEAR>::Do(DC_AUTO | DC_NO_WATER, subtile);
|
||||
if (!cost.Succeeded()) return cost;
|
||||
|
Reference in New Issue
Block a user