Follow-up Comment #2, bug #18231 (project freeciv):

I have tested this change over current trunk rev19760 and it seems to work.
But there is a remaining minor issue, that I already noticed before this

If the settler (pop_cost=1) is finished just the same turn that the city
grows to pop 2, then there is a message "can't build yet" and the settler is
not built until next turn.
I mean, there is a turn that settler is already bought, city already has pop
2, but settler does not appear until next turn.

I have tested the next code with default ruleset and it seems to work

if (get_city_bonus(pcity, EFT_GROWTH_FOOD) == 0
    && bestchoice.value.utype->pop_cost > 0
    && city_size_get(pcity) <= bestchoice.value.utype->pop_cost) {
  /* Don't buy settlers in cities that cannot afford the population cost. */

I suggest to use it, unless there is another reason to buy the settlers one
turn before they can be built.


Reply to this item at:


  Mensaje enviado vía/por Gna!

Freeciv-dev mailing list

Reply via email to