[Freeciv-Dev] (PR#13910) A_UNSET isn't used
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13910 >
> [mstefek - Wed Sep 07 08:42:52 2005]:
>
> > [jdorje - Wed Sep 07 08:23:01 2005]:
> >
> > When I finish researching the target and there is no goal set, the new
> > research target is supposed to be changed to unset.
> >
> > Instead, in the development version the server picks another tech
for me
> > to research.
> >
> > -jason
> >
> Your patch in #13385 in update_tech():
>
> + /* At the end of the turn an unset tech target will lead to one being
> + * picked randomly. You can't save bulbs over between turns. */
> + if (research->researching == A_UNSET) {
> + choose_random_tech(plr);
> + }
> + assert(research->researching != A_UNSET);
>
> The server basically interates over cities and increases
> bulbs_researched, when bulbs_researched >= total_bulbs_required it call
> tech_researched, which changes the value of target to UNSET if there's
> no goal. However if there is at least one city with positive science to
> iterate over then a tech will be choosen randomly in update_tech().
>
> I suggest reverting that part of 13385.
Hmm, the tech code is becoming too complicated for me to understand...
That check was supposed to be done at the end of the turn, right before
research is accumulated for the next turn. On the end-turn in which the
tech is actually researched it's supposed to be changed to A_UNSET and
bulbs from the rest of the end-turn can then be carried over if it's
changed during the following turn. This is all part of Per's design,
the purpose of which is to allow the player to choose all techs after
building Darwin's even if no goal is set.
-jason
|
|