Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] Re: (PR#10290) rfc: city production circuit
Home

[Freeciv-Dev] Re: (PR#10290) rfc: city production circuit

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bh@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10290) rfc: city production circuit
From: "Mike Kaufman" <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Sep 2004 15:23:54 -0700
Reply-to: rt@xxxxxxxxxxx

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

On Thu, Sep 23, 2004 at 03:09:03PM -0700, Benoit Hudson wrote:
> 
> First of all, I can't find the gen-effects patch anywhere on RT.  Maybe
> that's because I don't know what to search for, but if someone could point
> me the right direction, that'd be appreciated.  I don't know how much I'm
> repeating.

I believe that you can find it at PR#2521, but you could also just look in
CVS. It's in.
 
> a mfg plant could just call a function to add the mfg plant, then ask to
> recompute the shields.  Given the graph, we can know when adding the mfg
> plant that only mfg_factor, industry_factor and so on change, and we can
> clear them.  Then, when asked to recompute the shields surplus, we know
> that only depends on indsurplus and disorder, and work our way back until
> all the values are initialized. 

after rulesets are loaded, you would want to iterate through all the
buildings and find which alter production, which alter food, etc. and put
those is a set of caches.

Or coming at it again, you could have a many-to-one mapping of effects onto
which factor to initialize.

  Effect A \
  Effect B  > affects X factor
  Effect C /

  Effect D \  affects Y factor
  Effect E /

  Effect F >  affects Z factor

want to build building with effects A and F then X and Z must be dealt with
but not Y.

-mike




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