Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2000:
[Freeciv-Dev] patch: rapture-triggerd city growth, again.
Home

[Freeciv-Dev] patch: rapture-triggerd city growth, again.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] patch: rapture-triggerd city growth, again.
From: "Mike Jing" <miky40@xxxxxxxxxxx>
Date: Mon, 31 Jan 2000 08:18:03 EST
Reply-to: mike_jing@xxxxxxxxx

freeciv@xxxxxxxxxxxxxxxxxxx writes:
This is an automated notification of a change to freeciv cvs, on Tue Jan 18 10:08:55 PST 2000 = Tue Jan 18 18:08:55 2000 (GMT)
by Jeff Mallatt <jjm@xxxxxxxxxxxx>

---- Files affected:

freeciv/server cityturn.c

---- Log message:

Changed rapture-triggered city growth to not empty the foodbox.  This
conforms to Civ2.
Bug reported by Mike Webb <mjw@xxxxxxxxxxxx>.

It seems the change didn't fix the problem and also created a few new ones. The code is:

  /* increase city size if it is in rapture -- jjm */
if (city_celebrating(pcity) && government_has_flag(g, G_RAPTURE_CITY_GROWTH) &&
      pcity->size >= g->rapture_size && pcity->food_surplus > 0) {
    city_increase_size(pcity);
  }

But the foodbox is still emptied in city_increase_size().

Previously, the foodbox is filled at this point, and the city size is increase later when city_populate() is called. Now the city cize is increased before the code block for rapture stuff, so it has broken that part of the code.

This patch changed city_populate() and city_increase_size() to include the case of "rapture growth". The above check is moved into city_populate(). It is also checked in city_increase_size() so that it doesn't empty the foodbox. It also added a small function city_rapture_grow() in city.c to make things easier.

This patch should be applied after the one I sent just a bit earlier.

Mike



______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Attachment: rapture_growth_again.diff.txt
Description: Text document


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