Summary: plrcolormode=PLR_SET and PLR_RANDOM issues
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sat Jun 16 23:21:59 2012
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: In Progress
             Assigned to: jtn
        Originator Email: 
             Open/Closed: Open
                 Release: S2_4
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 2.4.0,2.5.0



There are a few issues, some major, with these values for 'plrcolormode':
* PLR_SET does not assign random colours when no explicit colour has been
assigned, as advertised. Instead all unassigned colours end up black.
* PLR_RANDOM makes no attempt to avoid assigning the same colour to multiple
players, even if there are enough colours to make this possible.
* 'playercolor XXX reset' isn't allowed when it should be (PLR_SET mode), due
to an incorrect test.

The attached patch reworks this feature to fix these issues, and makes some
other changes:
* Colours are visible in pregame ('/list colors' etc) when they're
* 'playercolor' warns if you're duplicating someone else's colour.
* It's no longer mandatory to use a hash character when specifying colours
("/playercolor Caesar '#ff0000'"), although it's still accepted. You always
seemed to need to quote it, which was annoying and the error message you get
back is confusing if you're not thinking about comments.
* When changing away from PLR_SET mode, colours set with 'playercolor' are
cleared, to avoid trouble.
* The client view is updated immediately if 'playercolor' is changed on the
server, rather than at a random time.
* Strings polished.

(Also, the current arrangements can I think call fc_rand() during pregame in
direct response to server commands, which just makes me itch. As of this
patch, only the end result of colour-related commands in pregame --
specifically, which colours have been set with 'playercolor' -- affects the
random sequence, and not until after the map has been generated.)


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to