mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-10 06:52:05 +01:00
This commit is contained in:
@@ -2494,8 +2494,8 @@ void GenerateIndustries()
|
||||
/* Total number of industries scaled by land/water proportion. */
|
||||
uint total_amount = p.total * GetNumberOfIndustries() / (lprob.total + wprob.total);
|
||||
|
||||
/* Scale land-based industries to the land proportion. */
|
||||
if (!water) total_amount = Map::ScaleByLandProportion(total_amount);
|
||||
/* Scale land-based industries to the land proportion, unless the player has set a custom industry count. */
|
||||
if (!water && _settings_game.difficulty.industry_density != ID_CUSTOM) total_amount = Map::ScaleByLandProportion(total_amount);
|
||||
|
||||
/* Ensure that forced industries are generated even if the scaled amounts are too low. */
|
||||
if (p.total == 0 || total_amount < p.num_forced) {
|
||||
|
||||
@@ -2421,7 +2421,7 @@ bool GenerateTowns(TownLayout layout, std::optional<uint> number)
|
||||
if (number.has_value()) {
|
||||
total = number.value();
|
||||
} else if (_settings_game.difficulty.number_towns == static_cast<uint>(CUSTOM_TOWN_NUMBER_DIFFICULTY)) {
|
||||
total = Map::ScaleByLandProportion(GetDefaultTownsForMapSize());
|
||||
total = GetDefaultTownsForMapSize();
|
||||
} else {
|
||||
total = Map::ScaleByLandProportion(GetDefaultTownsForMapSize() + (Random() & 7));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user