Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] Re: Post release patches
Home

[Freeciv-Dev] Re: Post release patches

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Post release patches
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Sat, 22 Jun 2002 20:31:30 +0200

On Sat, Jun 22, 2002 at 07:19:09PM +0100, Ben Webb wrote:
> On Sat, Jun 22, 2002 at 08:11:17PM +0200, Raimar Falke wrote:
> > On Sat, Jun 22, 2002 at 06:22:31PM +0100, Ben Webb wrote:
> > >   Indeed... but the helptexts can be out of date, or just plain
> > > misleading, or you can forget what they say... and sometimes it can be
> > > tricky to figure out where all of your city's gold production (for 
> > > example)
> > > comes from, particularly if your government or nation type also has an
> > > effect. I'm thinking of something similar to the existing happiness 
> > > display,
> > > which makes it quite clear when you have active happiness Wonders, even
> > > if they're in other cities.
> > 
> > Yes this idea is nice. So we have a list of improvements, wonders and
> > techs (TF_POPULATION_POLLUTION_INC for pollution) which show how
> > production, science, ... and pollution are modified?!
> 
>       That's the idea. The client already has this information (well, with
> impr-gen it does, anyway) so the only real complication is how to
> present it to the user. Also add governments and nations to this list...
> at least in SMAC, both can affect production and science.
> 
> > >   Ah. This sounds more difficult, so I'm not going to volunteer for
> > > it right now. ;) Sounds like this is something that AIs and agents would
> > > have to do anyway though, so presumably lots of code could be shared...
> > 
> > It really is easy:
> >  make a copy if the city
> >  add the improvement
> >  update_effects
> >  refresh_city
> >  compare city against backup and write down the changes
> >  revert to the backup
> >  update_effects
> >  refresh_city
> 
>       Yes, I've seen this sequence before; it seems the most
> straightforward way of doing this.

And the only sane way. Otherwise you have to have a lot of special
knowledge how these boni are calculated that you really don't want to
have multiple times in the code.

> It could be rather CPU-intensive though, depending on how often you
> do through the cycle. I'm pretty sure that the impr-gen effect
> update functions would require a bit of optimisation to cope with
> this, anyway. ;)

There is a price for not hardcoding the effects anymore.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "With a PC, I always felt limited by the software available.
   On Unix, I am limited by my knowledge."
    -- Peter J. Schoenster <pschon@xxxxxxxxxxxxxxxxx>


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