Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] Re: (PR#2521) effects patch

[Freeciv-Dev] Re: (PR#2521) effects patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: kaufman@xxxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2521) effects patch
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Fri, 27 Aug 2004 13:26:40 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: >

On Thu, 26 Aug 2004, Jason Short wrote:

> <URL: >
> As I said in PR#9817:
> I think default_building is not needed. aicity shouldn't be using it
> anyway, it should use get_building_with_effect(EFT_PROD_TO_GOLD)
> (find_source_building in the effects patch). city.c can just pick any
> random building to build:
>    impr_type_iterate(b) {
>      if (can_build_improvement(pcity, b))
>        pcity->currently_building = b;
>    } impr_type_iterate_end;

I suppose that is fine. But bear in mind find_source_building is meant as
a short-term hack, besides being slow (linear search).

Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa

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