Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: (PR#725) Production upgrade of newly-researched units
Home

[Freeciv-Dev] Re: (PR#725) Production upgrade of newly-researched units

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ChrisK@xxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#725) Production upgrade of newly-researched units deferred
From: "ue80@xxxxxxxxxxxxxxxxxxxxx via RT" <rt@xxxxxxxxxxxxxx>
Date: Fri, 17 Jan 2003 09:25:14 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Fri, Jan 17, 2003 at 05:08:48AM -0800, Joona Kiiski via RT wrote:
> On Fri, Jan 17, 2003 at 12:33:44AM -0800, Per I. Mathisen via RT wrote:
> > 
> > On Fri, 17 Jan 2003, Jason Short via RT wrote:
> > > > 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.
> > >
> > > Upon further review, this really is the only solution.
> > 
> > While we're at it, let's ensure that cities grow before producing
> > settlers. Here's Thomas's patch for this issue, which I haven't yet gotten
> > around to testing properly, let alone committing.
> > 
> >   - Per
> > 
> 
> Just one note about the patch.
> 
> > @@ -1089,7 +1088,6 @@
> >  **************************************************************************/
> >  static bool city_build_stuff(struct player *pplayer, struct city
> >  *pcity)
> >  {
> > -  city_distribute_surplus_shields(pplayer, pcity);
> >    nullify_caravan_and_disband_plus(pcity);
> >  
> >    if (!pcity->is_building_unit) {
> 
> 
> I don't like that, city_distribute_surplus_shields is moved away and
> nullify_caravan_and_disband_plus is left there.
> Those functions belong together! The first updates
> shield stock and the second nullifies all shield stock bonuses.
> 
> Maybe it wouldn't implement obvious bug,
> but at least it would make code more messy and harder to understand.

With the current rules there isn't any differences between both
versions. 
 
> Either leave them both there or move them elsewhere, just keep them
> together :)

Getting the shields because production output is for a given time and
nullify_caravan_and_disband is before the production. If both periods
have the same duration its ok to let them together, but when making one
of the periods is shorter you have to move the nullify to the building.

Thomas Strub
-- 
Thomas Strub  ***  eMail ue80@xxxxxxxxxxxxxxxxxxxxx
Wenn Du nicht programmieren kannst und Dir für Arbeit zu schade bist:
Werde Berater, Analyst oder organisiere Kongresse.



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