Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2001:
[Freeciv-Dev] Re: population cost patch
Home

[Freeciv-Dev] Re: population cost patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Michael Kiermaier <michael.kiermaier@xxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: population cost patch
From: Arien Malec <arien_malec@xxxxxxxxx>
Date: Fri, 9 Mar 2001 10:44:10 -0800 (PST)

--- Michael Kiermaier <michael.kiermaier@xxxxxxx> wrote:
> ok, i merged arien´s and my patch

Looks really good! Your changes get a lot of stuff that I missed.

> * the meaning of add_to_size_limit changed. it was the largest size
> for
> adding settlers to a city. now it is the maximum size a city can be
> grown
> to.

I assume you mean "grown to by means of settlers or other population
units" -- you can always grow "organically"

> these notes are for arien:
> 
> * in cityturn.c the functions city_reduced_by_famine and
> city_auto_remove_workers were only used once, so i moved the code to
> the
> locations of these function calls.

I tend to want to subdivide large functions into atomic units, but it
doesn't bother me at all this way

> besides city_built_woker_cost was not necessay.

That was a relic of the existing code, but your approach is much
cleaner. IMHO, city_build_stuff is in drastic need of a thorough
refactoring...

> 
> things to do:
> 
> * pressing the "b"-key does not add units with AddToCity, but without
> Cities
> and Settlers flag to a city. up to now i did not look for the reason
> again,
> but this should be fixed.

See my previous e-mail: the problem is in request_unit_build_city

---Quote previous e-mail ---
"b" should trigger the MENU_ORDER_BUILD_CITY callback action,
which should trigger:

http://www.freeciv.org/lxr/source/client/gui-gtk/menu.c?v=cvs#L305

That code does a test on can_unit_add_to_city....

The chain of calls leads to:

http://www.freeciv.org/lxr/source/client/control.c?v=cvs#L557

Which then does a test on can_unit_build_city, and here we have the
problem....
--- end quote ---

Arien

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/



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