longturn / freeciv21

Develop your civilization from humble roots to a global empire
GNU General Public License v3.0
218 stars 42 forks source link

Newly settled cities may pick tiles outside of FoV #2340

Open hugomflavio opened 1 month ago

hugomflavio commented 1 month ago

Describe the bug When settling a city, the settler temporarily illuminates all the tiles reachable by the city. This allows the newly founded city to pick any tile from its working area. However, as the settler is disbanded and the FoV is reduced (in LTX), the tile picked may go dark (e.g. if you have a wheat at the edge of your working area and it got picked). Because the tile is now under fog of war, the user cannot see which tile is being used by the newly founded city. The user also cannot interact with this tile or citizen, preventing directly setting entertainers or changing the tile being used. This can be corrected by clicking the city centre, which brings the citizen back into the currently-visible tiles.

To Reproduce Steps to reproduce the behavior:

  1. Use a ruleset where the city FoV is small
  2. find a settling spot with good tiles at the edge of the city's working area
  3. settle a city
  4. open the city dialogue
  5. See error

Expected behavior There are two options to make this less confusing for newbies: 1) Show the citizen working in the shadowed tile. This could imply slightly darkening the 2|1|0 (assuming wheat in early game) badge as well, for more effect. This solution should also allow the user to click the tile being used to recall the citizen, but it should warn the user that they won't be able to set that citizen back on that tile. 2) Adjust the city foundation code so the city does not pick a tile away from the city FoV. Unless another unit is making those tiles visible!

Screenshots Grabbed this from the discussion in LT85. Notice how only one worked tile shows up on the map (the city centre), but the city stats give away the presence of a second tile being worked.

image

Platform and version (please complete the following information):

jwrober commented 1 month ago

We could also add some text to the help on cities to discuss this as well.

jwrober commented 1 month ago

Note: FoV = Field of View, also known as Viewing Radius, which can be different than the Working Radius.