FS#4186 - Add "City" status to towns list

Attached to Project: OpenTTD
Opened by Moriarty (Moriarty) - Tuesday, 26 October 2010, 12:51 GMT
Last edited by andythenorth (andythenorth) - Saturday, 02 September 2017, 12:05 GMT
Type Feature Request
Category Core
Status With patch
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version Version?
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
  • Kogut (Kogut) (2010-11-03)
Private No


Hopefully as simple as it seems.
The town directory currently says the following for each entry:


I would simply like to suggest ammending this, at least for cities, to:


Non-cities would remain unchanged. I would suggest saying "City" in a different coloured font too. Maybe white?
This way a user can easily find the cities and give them special treatment if desired.
This task depends upon

Comment by S├ębastien Brissaud (sbr) - Friday, 29 October 2010, 10:16 GMT
I was also thinking of that recently.

Towns are wrote with the 'STR_TOWN_DIRECTORY_TOWN' string.

The first patch introduce a new string 'STR_TOWN_DIRECTORY_CITY' that insert " (City)" between the town name and its population. The city status is draw in yellow to highlight it while keeping the same colours as in other brown windows.
The town directory is also made horizontally resizable as the line length now depends of the used language.

The second patch add this new string in all language files that define 'STR_TOWN_VIEW_CITY_CAPTION'.

Please find attached these two patches against r21054 and a screenshot of the town directory.
Comment by Moriarty (Moriarty) - Sunday, 31 October 2010, 14:19 GMT
That's pretty much exactly as I envisioned it. Thanks S├ębastien. Now for it to be merged.
Comment by andythenorth (andythenorth) - Monday, 21 August 2017, 08:00 GMT
Idea looks valid to me - town window already shows '(City)' and this patch simply provides useful consistency.

Tested this on r27895, failed to apply (not surprising given age of patch).

patching file src/lang/english.txt
Hunk #1 FAILED at 2524.
1 out of 1 hunk FAILED -- saving rejects to file src/lang/english.txt.rej
patching file src/town_gui.cpp
Hunk #1 FAILED at 636.
Hunk #2 FAILED at 770.
2 out of 2 hunks FAILED -- saving rejects to file src/town_gui.cpp.rej