freeciv21
freeciv21 copied to clipboard
City ID in middle click
Is your feature request related to a problem? Please describe. When evaluating what enemy cities to capture, it would be good to know the ID of the city to gain a sense of the age of the city. Older cities, when captured, give the most territory to the victor.
Describe the solution you'd like Add the ID of the city to the middle click pop up menu.
Describe alternatives you've considered None
Additional context None
Would it be possible to show the founding date instead? Using in-game time. That would be a neat addition, perhaps nicer than IDs.
Would it be possible to show the founding date instead? Using in-game time. That would be a neat addition, perhaps nicer than IDs.
I don't think we have this information. At least I couldn't find it in the city struct
What about the turn when the city was built? If that is stored, perhaps it could be calculated from there.
This is what we have: https://github.com/longturn/freeciv21/blob/ad20326066bb6c1ffef303b475620508b1a88c0a/common/city.h#L283-L454
Turn founded: https://github.com/longturn/freeciv21/blob/ad20326066bb6c1ffef303b475620508b1a88c0a/common/city.h#L349
I must be blind :D
can we back-calculate the year from the turn to make it look fancier?
mmmh, I'm not entirely sure we can. Will need to check
The turn works well enough for now. I'll try to figure this out once we're done with #2232
@blabber posted in another issue:
I have a commit (https://github.com/longturn/freeciv21/commit/415d813cf5f4406306064063c9dea9afc5071a1f) in my local, that displays the turn_founded for a city in the popup info. Testing shows, that you can rely on turn_founded only for your own cities.
For foreign cities, after reloading a saved game, turn_founded seems to contain the turn number when the game was reloaded. Even before reloading I had the impression, that turn_founded displayed the turn number when I discovered the city rather than when it was founded by the enemy, but I didn't check this any further.