HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
Bug #918821
openSort out non-standard unit upkeeps
0%
Description
uk_science
, uk_luxury
, uk_trade
to units' sections. But the result is buggy:
- Trade upkeep works mostly as expected, just some minor interface problems appear (gold is gone into "(unknown)" direction)
- Luxury upkeep breaks workers' auto-arranging and CMA, otherwise does not do anything (luxury for citizens moods is taken from full production).
- Science upkeep causes interface inconsistence, otherwise affects only city migration score (in
update_bulbs()
full science production is taken). But Ilkka in PM doubts this case. - None of this upkeeps leads to units disbanding, but for existing Freeciv versions this thing maybe should be left untouched.
I think the idea of such upkeeps is too rich to just plumb it out of usage, and we should sort it out, at least make 2.6 clients understand them in the same way as the server does.
Updated by Anonymous almost 4 years ago
Yeah, Science upkeep basically worked for me, apart from the display issues, but only because I was using a server with the Longturn patches and that was accidentally changed (fixed?) there. The distribution server uses the prod
value for science, so the upkeep costs get ignored when the city is actually processed: https://github.com/freeciv/freeciv/blob/S2_6/server/cityturn.c#L3047
At least with the GTK 3.22 client, the city dialog also shows the prod
values for Science and Lux. (For gold, it shows both prod
and surplus
). The popup with the breakdown shows usage and final surplus, though, matching what the Research view (F6) shows. https://github.com/freeciv/freeciv/blob/S2_6/client/gui-gtk-3.22/citydlg.c#L1842
The Cities listing (F4) also seems to show prod
, not surplus
for Sci.
For Gold/Lux/Sci, the breakdown the client calculates for the popup uses the prod
value for Trade, hence the "unknown" fields if there's Trade upkeep: https://github.com/freeciv/freeciv/blob/S2_6/client/citydlg_common.c#L879 vs. how the server does include usage
in this case: https://github.com/freeciv/freeciv/blob/S2_6/common/city.c#L2658
Also, the prod
fields are defined as UINT16, so negative Trade makes the Gold/Lux/Sci values wrap around with the "Trying to put -2 into 16 bits: it will result 65534 at receiving side" messages and similarly the overflown number shows in the city dialog. And of course, there's no icons for trade/lux/sci upkeep for the units in the city dialog, like there is for food/shields/gold, which kinda also makes for a bad UI.
FWIW, I can imagine it mostly creating just confusion when someone decides to make a ruleset with part gold upkeep, part trade upkeep, part something else...
Updated by Marko Lindqvist over 3 years ago
- Sprint/Milestone changed from 2.6.4 to 2.6.5
Updated by Marko Lindqvist over 3 years ago
- Sprint/Milestone changed from 2.6.5 to 2.6.6
Updated by Marko Lindqvist almost 3 years ago
- Sprint/Milestone changed from 2.6.6 to 3.0.1
Updated by Marko Lindqvist over 2 years ago
- Sprint/Milestone changed from 3.0.1 to 3.0.2
Updated by Marko Lindqvist over 2 years ago
- Sprint/Milestone changed from 3.0.2 to 3.0.3
Updated by Marko Lindqvist over 2 years ago
- Sprint/Milestone changed from 3.0.3 to 3.0.4
Updated by Marko Lindqvist about 2 years ago
- Sprint/Milestone changed from 3.0.4 to 3.0.5
Updated by Marko Lindqvist almost 2 years ago
- Sprint/Milestone changed from 3.0.5 to 3.0.6
Updated by Marko Lindqvist almost 2 years ago
- Sprint/Milestone changed from 3.0.6 to 3.0.7
Updated by Marko Lindqvist over 1 year ago
- Sprint/Milestone changed from 3.0.7 to 3.0.8
Updated by Marko Lindqvist 8 months ago
- Sprint/Milestone changed from 3.0.8 to 3.1.1