Change station naming to allow unsuffixed name at an increased distance

pull/556/head
Jonathan G Rennison 1 year ago
parent 203d8f020b
commit c339978569

@ -313,7 +313,8 @@ static StringID GenerateStationName(Station *st, TileIndex tile, StationNaming n
/* check close enough to town to get central as name? */
const bool is_central = DistanceMax(tile, t->xy) < 8;
if (HasBit(free_names, M(STR_SV_STNAME)) && (is_central || DistanceSquare(tile, t->xy) <= t->cache.squared_town_zone_radius[HZB_TOWN_INNER_SUBURB])) {
if (HasBit(free_names, M(STR_SV_STNAME)) && (is_central ||
DistanceSquare(tile, t->xy) <= std::max(t->cache.squared_town_zone_radius[HZB_TOWN_INNER_SUBURB], t->cache.squared_town_zone_radius[HZB_TOWN_OUTER_SUBURB]))) {
return STR_SV_STNAME;
}

Loading…
Cancel
Save