Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2000:
[Freeciv-Dev] Worklists, take II
Home

[Freeciv-Dev] Worklists, take II

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Worklists, take II
From: Corin Anderson <corin@xxxxxxxxxx>
Date: Thu, 13 Jan 2000 21:17:29 -0800 (PST)

Hello.

  I have addressed all the bugs and most of the suggestions that you folks
have given me for the worklist feature.  Attached is a patch against the
most recent CVS snapshot.  Please have a look and let me know if anything
more needs to be changed.  There are still open issues, and I have a few
more feature extension ideas (both listed below), but I'd really like to
roll this into CVS before going much farther (so I don't have to keep such
a huge ball of changes on just my machine!).

FEATURES

* Worklists.  Whee!  Each city has a worklist, which the server will honor
  as the city produces things (ie, if your client goes down and the game
  marches on, at least your cities will follow your production orders).

* Global worklists.  These are for convenient copying into cities.  Define
  a few global worklists and copy their contents into cities as you settle
  your land.

* New production penalty rules [not really a worklist issue, but related
  to switching production targets].  See my earlie mail for more details,
  but, essentially, you don't get penalized for switching a city's target
  at the obvious time (ie, the turn when a city produces something).

SUGGESTIONS IMPLEMENTED / BUGS FIXED

* Worklist button now is below city improvements button in city dialog.
* You can't add an obsolete target to a worklist (no more barbarian
  leaders in worklists).
* You can toggle whether the worklist targets show currently available
  targets or any future targets.
* Pre-worklist .sav files can once again be used.
* The L shortcut in the Gtk client works.
* Code (style) cleanup done.
* City dialog, report displays "(from worklist)" after current target,
  when appropriate.
* Production of obsolete units in existing worklists is auto-upgraded when
  possible (ie, if a worklist calls for production of a phalanx, after
  gunpowder exists, a musketeer will be targetted instead).
* A 'prepend' button is added to the worklist editor.


KNOWN ISSUES

* The patch may not apply well if you've already applied the "print #
  turns 'til complete" patch.  Both it and my patch modify
  city_dialog_update_building().  [CVS maintainer:  if the turns done
  patch is commited soon, I'll make a new worklist patch against a newer
  CVS snapshot. 

* Worklists are fixed in length.  Presently, there are 16 slots, which
  I've never come ever close to filling (I can think ahead only about 8 or
  so targets, and only then when I'm alternating production between
  two units).  Of course, 16 is actually a WORKLIST_MAX_LEN or something
  in a .h file, so it's easy to change.  But, it is a fixed number.

* Ditto for the number of global worklists -- 16.

* The Xaw worklist editor dialog has sporatic problems.  The dialog may be
  layed out enormously wide -- you'll see only the left side (which
  thankfully includes the cancel button!).  Closing and opening the dialog
  usually fixes the problem.  The problem is also accompanied by the
  following text (this text sometimes appears even though the dialog is
  layed out okay):

    Warning: constraint loop detected while laying out child 'wlist' in
    FormWidget 'wview'

  I suspect that I simply have too many/few forms in my dialog, but darned
  if I know how to fix it.  A prize will go to the first developer to (a)
  explain and (b) correct this problem.

* The label for the Show Future Targets checkbox in the Xaw client has a
  dark background.  I don't why.  I'd rather it didn't.  More black magic
  to me.

* The Yes/No toggle in the Xaw client for the Show Future Targets option
  doesn't have enough room for the Yes option.  How do I tell the client
  to give the widget more room?


FUTURE FEATURES

* Add a checkbox to the Change All dialog (from the city report) to change
  targets that are in city worklists as well.

* Allow Change All to change cities to global worklists.  This feature is
  a bit tricky because it's not a one-for-one substitution -- prepending
  the global worklist into a city worklist may be a bit tricky, esp. if
  the worklists are bounded in length (as they currently are).

* Add a Prepend button (akin to the Change button) to the city report.

* Nix the preset length limit on worklists.  The hardest part here, at
  least for me, is in figuring out how to send variable-length worklists
  in fixed-sized packets, and how to save variable-length worklists in the
  .sav file.  I -think- that this could be done with a number of worklist
  "atom" packets -- each having a position and target in the worklist (so,
  to send a length-4 worklist, you send 4 worklist atom packets).  But,
  I'd be happier if there were a better way.  Ideas?

* The global worklist editor dialog is modal.  While this choice made my
  coding life a bit easier, I'm not sure that it's the most intuitive
  choice for the user.

Corey

Attachment: worklist-patch-2.diff.gz
Description: Binary data


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