Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] Re: (PR#4426) Adding worklist commands to gui-gtk-2.0 city
Home

[Freeciv-Dev] Re: (PR#4426) Adding worklist commands to gui-gtk-2.0 city

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jjc@xxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4426) Adding worklist commands to gui-gtk-2.0 city report dialog
From: "Michael Mielke" <michael@xxxxxxxxx>
Date: Fri, 29 Aug 2003 16:51:20 -0700
Reply-to: rt@xxxxxxxxxxxxxx

I'd like to see the ability for worklists of where you place the workers 
in the city.

On Fri, 29 Aug 2003, jjc@xxxxxxxxxxxxxxxxxx wrote:

> Detailed description of patch:
> Adds three new menus after the change menu in the city report dialog
> (the city report dialog is the one with the list of all the cities) for
> the gtk2 client.  These menus implement the following abilities for 
> modifying cities worklists:
> First: Add the new production ahead of everything (including current
>       production), moving everything back.
> Next: Add the new production ahead of everything EXCEPT current production
> Last: Add it to the end of the worklist.
> 
> This patch adds two new convenience function for working with worklists
> in common/worklist.h :
> 
> /***************************************************************
> Adds the id to the next available slot in the worklist
> Returns true if successful.
> ***************************************************************/
> bool worklist_append(struct worklist *pwl, int id, bool is_unit);
> 
> /***************************************************************
> Inserts the id to the location idx in the worklist
> Moves all other ids back an index.
> Returns true if successful.
> ***************************************************************/
> bool worklist_insert(struct worklist *pwl, int id, bool is_unit, int idx);
> 
> These functions are used to implement the above abilities.
> 
> 
> Reason for existance:
> I often want to add something to several cities worklists.  For example,
> when I discover university I would like to have all my science producing
> cities build one.  With this patch I can sort the list by CMA or by amount
> of science, and then select the first few cities, and then go to last->
> improvement->University and university will be added to the worklist of 
> all those cities. If I had used the change instead, it would have killed the 
> current projects of the cities that I had selected.
> 
> Additional Comments:
> A patch to do this has been requested at least twice on freeciv-dev.
> 
> This patch does not implement any new network protocols and can be built into
> a client and used with standard unmodified servers.
> 
> This patch will silently refuse to do a command that will cause the 
> worklist to overflow.
> 
> The commands Next and Last do not check to see if and pending improvements
> will allow additional improvements to be made. For example, if a Library is
> currently being built, they do not allow University to be added until the 
> library is completed.
> 
> Changes since last posting:
> Added the function worklist_insert
> Added an implementation of the First and Next commands as requested by 
>       John Wheeler.
> Changed name of Append to Last.
> Fixed bug in worklist_append that would occur if the worklist was almost
>       full.  Previously, append would put a WEF_END in the entry after 
>       the last location in the worklist array.
> 
> Patch review comment:
> I will gladly review a patch or three in exchange for someone reviewing this
> patch.  Just email me the rt patch number that you want reviewed (I use the 
> gtk2 gui so probably can't review other gui's) by Sunday and I will take 
> a look at it then.
> 
> 
> 

-- 
Michael Mielke <michael@xxxxxxxxx>
http://www.mielke.cc/~michael/




[Prev in Thread] Current Thread [Next in Thread]