Ticket #42253

Governor Presets Shown as "custom" (3.1.90.3-dev 132f869f05)

Open Date: 2021-05-13 04:57 Last Update: 2022-02-09 22:43

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

This applies to qt and gtk guis. It happens if you upgrade your config from S3_[01]or if you start without any ~/.freeciv/.

So let's start with no config. Start a new game. Build a city. In the city dialog, create a new governor preset. Save it. Set the city to run that new governor preset. Go to the Cities page. Observe that this page claims the city is running with the "custom" governor.

The fact that qt and gtk behave the same, means to me that the server is doing stuff that I would have imagined was being done in the client. Ok, I guess that's why the guis are so consistent.

Ticket History (3/7 Histories)

2021-05-13 04:57 Updated by: chippo
  • New Ticket "Governor Presets Shown as "custom" (3.1.90.3-dev 132f869f05)" created
2021-05-20 07:05 Updated by: cazfi
Comment

Reply To chippo

The fact that qt and gtk behave the same, means to me that the server is doing stuff that I would have imagined was being done in the client. Ok, I guess that's why the guis are so consistent.

Server should have nothing to do with client governor presets. Sounds more like it's in client-common code.

2022-02-01 13:45 Updated by: cazfi
Comment

After some investigation (but not full) I suspect the 'max_growth' field of the the cma parameter is not part of the city attribute block that's stored in the savegame. As a result, the city's cma settings loaded from the savegame are not exactly the same as the preset.

2022-02-01 13:59 Updated by: cazfi
Comment

Ok, handling of 'max_growth' is lacking in multiple ways (will open separate ticket about the one identified earlier). The particular problem in this ticket is caused by having wrong value on the preset side, after loading it from the client settings file. It's not saved there at all. We could start saving it, but as there's no gui to adjust it, more sane approach at this point is probably to just set it to the default value.

2022-02-01 14:08 Updated by: cazfi
  • Resolution Update from None to Accepted
  • Milestone Update from (None) to 3.1.0 (closed)
  • Component Update from (None) to Client common
Comment

The 'max_growth' field was added in S3_1. Arguably the general solution of this fix could go to S3_0 too.

2022-02-09 22:43 Updated by: cazfi
  • Status Update from Open to Closed
  • Owner Update from (None) to cazfi
  • Resolution Update from Accepted to Fixed

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login