bugFreeciv - Bugs: bug #20848, Allow the user to have CMA to have...

Show feedback again

bug #20848: Allow the user to have CMA to have no minimum surplus for a category.

Submitted by:  None
Submitted on:  Mon May 27 19:13:44 2013  
Category: client-gtk-3.0Severity: 1 - Wish
Priority: 5 - NormalStatus: None
Assigned to: NoneOriginator Email: -unavailable-
Open/Closed: OpenRelease: 2.3.2
Operating System: AnyPlanned Release: 
Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sat Jun 1 12:54:19 2013, comment #1:

These bounds appear to be determined client-side, in the code for creating the sliders in client/gui-gtk-[23].0/cma_fe.c; in the gtk-2 version on lines 327 - 328:
pdialog->minimal_surplus[i] =
GTK_ADJUSTMENT(gtk_adjustment_new(-20, -20, 20, 1, 1, 0));

and in the gtk-3 version probably lines 343 - 345:
pdialog->minimal_surplus[i] = hscale =
gtk_range_set_range(GTK_RANGE(hscale), -20, 20);

These seem to override a value of -60 for a preset defined in the cma section of ~/.freeciv-client-rc-<version>.
Easy enough to change by themselves, but at least the Gtk-2 version won't adjust its size accordingly making precise control (such as setting a slider back to 0 after going to -50) all but impossible.
I don't intend to learn gtk-2 long after it's been deprecated and I won't touch the gtk-3 one until I've upgraded my distro so I can compile it, but I hope I've pointed someone else in the right direction.

Micke <mss_8734>
Mon May 27 19:13:44 2013, original submission:

At this time, the GTK client, and perhaps the other clients as well, force the user to set minimum surplus for each category of production to at least -20.

In late-game, this makes it impossible to, e.g., have some cities "subsidize" others, and to have a low tax rate for Gold while using production of Coinage to make up for the deficit: the CMA will turn citizens into Taxmen (and, if this creates a food shortage, turn itself off) in order to bring the deficit up to -20.

It would, therefore, be helpful if it were possible to set it to -Infinity, or to otherwise instruct the CMA to ignore it. This could be accomplished by either having the leftmost setting on the Minimum Surplus slider be -Infinity or have a checkbox next to it to control whether a Minimum Surplus should be enforced.



(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mss_8734 (Posted a comment)
  • -unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup