From b6c967aae3edd3b6c5b06cdcf4581c9cbf0ffaa3 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Mon, 18 Apr 2022 22:56:18 +0100 Subject: [PATCH] Adjust order of station name assignments --- src/station_cmd.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 622c04edae..7000c6cd9e 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -313,9 +313,6 @@ static StringID GenerateStationName(Station *st, TileIndex tile, StationNaming n if (HasBit(free_names, M(STR_SV_STNAME)) && (is_central || DistanceSquare(tile, t->xy) <= t->cache.squared_town_zone_radius[HZB_TOWN_INNER_SUBURB])) { return STR_SV_STNAME; } - if (is_central && HasBit(free_names, M(STR_SV_STNAME_CENTRAL))) { - return STR_SV_STNAME_CENTRAL; - } bool use_extra_names = _extra_station_names_used > 0; auto check_extra_names = [&]() -> bool { @@ -353,6 +350,11 @@ static StringID GenerateStationName(Station *st, TileIndex tile, StationNaming n if (extra_name) return STR_SV_STNAME_FALLBACK; } + /* check close enough to town to get central as name? */ + if (is_central && HasBit(free_names, M(STR_SV_STNAME_CENTRAL))) { + return STR_SV_STNAME_CENTRAL; + } + /* Check lakeside */ if (HasBit(free_names, M(STR_SV_STNAME_LAKESIDE)) && DistanceFromEdge(tile) < 20 &&