[Freeciv-Dev] (PR#725) Production upgrade of newly-researched units defe
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
[ChrisK@xxxxxxxx - Wed Mar 14 17:21:38 2001]:
> When Explosives are sucessfully researched, the
> production is upgraded from settlers to engineers
> in _some_ cities, but not in _all_.
This is an annoying bug.
The proposed solution is to reorder the handling of cities so that all
gold and science is generated first, then everything else (including
unit upgrades) is considered.
This could have some drawbacks if done improperly. For instance if we
do revenues in the first loop and expenses in the second, a civilization
that had to sell off improvements to stay afloat would end up having all
the improvements of the last city be sold before any previous
improvements. The loop itself is also a bit tricky since production is
intentionally handled before everything else - since production can lead
to the city being disbanded. It would mean that cities that were
disbanded during the upkeep phase would end up contributing science (at
least) during the turn in which it was disbanded. This is a rule change
- is it acceptable?
An alternative would be to leave the primary loop as it is, but to add a
secondary loop that just checks for production upgrades. But this loop
would then also have to check to see if the upgrade resulted in the
production being completed; an unnecessary duplication.
Finally, there is the consideration that in the future improvements may
be upgradable as well. I don't really see how this would affect the
design of the solution, though, it just means that we'll have to add
improvement-handling code wherever we end up putting the check.
P.S. The relevant code is upgrade_unit_prod in server/cityturn.c.
jason
- [Freeciv-Dev] (PR#725) Production upgrade of newly-researched units deferred,
Jason Short via RT <=
|
|