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

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

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8754) effects patch
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Fri, 9 Jul 2004 08:26:40 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8754 >

On Thu, 8 Jul 2004, Mike Kaufman wrote:

> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8754 >
>
> On Thu, Jul 08, 2004 at 03:34:29PM -0700, Vasco Alexandre da Silva Costa 
> wrote:
>
> > The sources cache is pretty much separate from the effects code. You
> > could implement it any way you desire as long as it provides the
> > required API functionality.
>
> so the only places in the code now that think that wonders are unique are
> in the core effects code?

No, it is just that they already are in CVS HEAD. This patch doesn't
touch them. The only effects functionality which depends on the way
sources are implemented is target_in_range.

About CVS HEAD:

See city_got_building, city_add_improvement, city_remove_improvement,
initialize_globals, city_build_building, etc.

Those are used to create the currently existing sources cache
(pcity->improvements, game.global_wonders, etc).

That code is a mess of its own really, so I think it deserves a separate
patch.

> > I think I will just kludge these for now like Ben did, but this code
> > needs to be re-thought. It is indeed very nasty. Do you know that
> > ticket's number? It could be interesting.
>
> PR#3603
>
> [snip various palace issues]
>
> yeah, ok, these all suck, but my question is that "Capital_Exists" and
> "Capital_City" should take care of most of these issues. What if you have
> multiple Capital_Exists improvements? Also some or all of these could be
> made additional effects. I don't really like the idea of special-casing a
> particular improvement.

Ok, I will add the Capital_City effect to Palace and use it for as much
Impr_Type_id hardwired code as possible. I will also try to split up more
effects and other Palace features.

But I will still need to use the hardwired ID for at least
handle_city_short_info.

> > It is short for "element". It is like using "i", "it", "iterator" or
> > "node" as variable names.
>
> hmm, I don't like. Using "e*" in the effects code gives the impression of a
> special naming convention.

Ok, I will use pimpr and peff as applicable then.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa




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