<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40374 >

> [EMAIL PROTECTED] - Sun Jul 13 21:31:15 2008]:
> This feature may have been in the editor
> previously but is probably commented out now, so
> I tried to implement it the "proper way". With
> this patch you can let cities build items like
> improvements and units while in editor mode
> by clicking on the "buy" button of the general
> cityreport dialog (Hotkey "F4" in the GTK GUI,
> where you get a list of all cities of one
> player). This will cost nothing for the player
> owning the city and the improvements/units will
> be immediately added to the given city without
> having to wait one turn like in the usual context
> of this button. This feature should work with
> any clients supporting the Editor mode however,
> it won't affect the "buy" button you get in
> the normal city dialog when double clicking
> on a city (either on the map or in the general
> cityreport). That's what I'm currently looking
> after to change, but it looks like this button
> and it's callback is implemented GUI specific,
> but that is just guessing of mine.

Ah I now understand what you were getting at when
you mentioned this patch to me before. It was my
mistake really, in that I should have understood
that you meant that this would be the way it works
in edit mode.

Actually I have opted for a different design with
respect to the editing of the internal state of
game entities (e.g. the city improvements in a city).

Instead of adding a huge amount of heterogeneous
editor-mode-checking code in the player GUI (e.g.
the city dialog or city overview list) and similarly
in the in-game packet handlers in the server, I
want to have all the state editing code in one
place, namely in the property editor code in
client/gui-gtk-2.0/editprop.c (and the corresponding
server-side handlers in server/edithand.c).

I am actually in the process of posting a patch
implementing the general framework for this right
now, so you should be able to read more about it
in that post (if you have subscribed to freeciv-dev
mailing list at https://mail.gna.org/listinfo/freeciv-dev/).

> As you may have thought I'm completely new to
> this project and am just mostly busy trying
> to learn to look through the existing code and
> guessing how I could work with it. So any further
> contributions may take some time.

No problem, it takes a while to get familiarized with
the freeciv code base and conventions anyway. :)


Freeciv-dev mailing list

Reply via email to