Change: Scale towns/industries by amount of land tiles. (#10063)

This commit is contained in:
Peter Nelson
2025-10-24 21:32:09 +01:00
committed by dP
parent 3a7260c2d6
commit 2608ff2bac
8 changed files with 115 additions and 43 deletions
+3 -2
View File
@@ -55,6 +55,7 @@
#include "road_cmd.h"
#include "terraform_cmd.h"
#include "tunnelbridge_cmd.h"
#include "map_func.h"
#include "timer/timer.h"
#include "timer/timer_game_calendar.h"
#include "timer/timer_game_economy.h"
@@ -2732,9 +2733,9 @@ 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 = GetDefaultTownsForMapSize();
total = Map::ScaleByLandProportion(GetDefaultTownsForMapSize());
} else {
total = GetDefaultTownsForMapSize() + (Random() & 7);
total = Map::ScaleByLandProportion(GetDefaultTownsForMapSize() + (Random() & 7));
}
total = std::min<uint>(TownPool::MAX_SIZE, total);