Summary: [Patch] Worklist clean up
                 Project: Freeciv
            Submitted by: pepeto
            Submitted on: Wednesday 07/01/2009 at 16:20
                Category: client
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None



The attached patch (against trunk/) fixes two problems linked with the client
global worklists and the option 'save_options_on_exit'.  In some cases, the
global worklists are not loaded then when the rc file is rebuilt, the
informations are lost and you have to recompute all your global worklists. 
This may occur when:
- you leave a server before the game starts.
- you have a worklist which doesn't fit the used ruleset.

Feature details:
- 'struct worklist' loses 2 fields: is_valid and name, which don't make sense
on a city worklist.
- init_worklist() is renamed worklist_init() and copy_worklist() is renamed
- A new structure exists, named 'global_worklist', which contains a worklist
or the information strings to compute a worklist after a ruleset is sent.
- The number of user worklists are no more limited to a hard-coded reference
(using genlist).
- All worklists are loaded at start. They are built at the start of running
start, and unbuilt when the game is freeing.  All worklists are saved,
notably the ones which doesn't fit the ruleset.
- universal_kind_name() and universal_type_rule_name() appeared to be
similar.  But, at many points of the code (notably the savegame module), a
function taking a 'enum universals_n' was needed.  I modified
universal_kind_name() according to this consideration.
- Note also it breaks the network compability with sending less informations
in the worklist packet.


File Attachments:

Date: Wednesday 07/01/2009 at 16:20  Name: global_worklist.diff.gz  Size:
13kB   By: pepeto



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to