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...
Sort out non-standard unit upkeeps
uk_tradeto 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.
#1 Updated by Anonymous over 1 year 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
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
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
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...