[Freeciv-Dev] Re: (PR#10290) rfc: city production circuit
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<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
- [Freeciv-Dev] Re: (PR#10290) rfc: city production circuit,
Mike Kaufman <=
|
|