[Freeciv-Dev] city plan patch
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi,
This is a patch to create a "city plan" in freeciv. This
serves pretty much the same function as build lists (as implemented
in an old patch by Reinier Post that I looked at), but with several
differences. Each city plan (there can be only 1 per player in
the current implementation, but it would be very easy to allow several
to be defined) is a list of improvements to build. Every city has
the option of following the plan, which means that when it finishes
building an improvement, it builds the next possible thing off the
list instead of whatever the AI would have chosen. Unlike a "build list"
you can't set up each city individually, and nothing except improvements
are handled (i.e. no units, yet). However, the advantage is that there
is less micromanaging for the player to do. Implementation is very similar
to the "civilian government" feature of Galactic Civ.
Details:
1) It is client side only. This has drawbacks in that the plan itself,
and which cities are on the plan, are not saved between sessions.
Users can save their plans to a file in their directory, though. There
is also a drawback in that (as mentioned earlier), the server's AI will
go on with the normal stupid choices if you spend several turns offline
(although this is already the situation now). There is an advantage,
however, in that no extra packets are added, and the same server can
therefore deal with planned and plan-less clients. Unfortunately,
I had to make a minor change to the server (to send a city update
packet to the player right before the building change notification),
so the patched client requires the patched server (of course, the
patched server will still work with the unpatched client).
2) Plans are set up through a dialog under the "kingdom" menu. If
plans are activated, a toggle box appears in each city view allowing
that city follow or not follow the plan. If plans are not active,
there is no change to the city view, so the user doesn't need to
worry about plans at all if they don't want to.
3) It is implemented in the GTK client only (I hope some Xaw expert
can port the dialogs to the Xaw client). The core functionality is
GUI-independent, and in files in the client/ directory itself; only
the new dialogs and menus and such are in the gui-gtk directory.
Here's a patch against the Sep 12 CVS version. Look forward to
your comments!
JMC
--
John-Marc Chandonia (jmc@xxxxxxxxxxxxxxxx) We're everywhere...
Cohen Lab, University of California San Francisco for your convenience.
http://yuri.harvard.edu/~jmc -- Psi Corps <*>
cityplan.sep12.patch.bz2
Description: Binary data
- [Freeciv-Dev] city plan patch,
John-Marc Chandonia <=
|
|