Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: [PATCH] Re: All cities have trade of 0 (PR#1070)
Home

[Freeciv-Dev] Re: [PATCH] Re: All cities have trade of 0 (PR#1070)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Petr Baudis <pasky@xxxxxxxxxxx>
Cc: Alan Schmitt <alan.schmitt@xxxxxxxx>, Reinier Post <rp@xxxxxxxxxx>, Steve.Kay@xxxxxxxxxx, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Re: All cities have trade of 0 (PR#1070)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 9 Dec 2001 16:41:06 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, Nov 26, 2001 at 04:03:44PM +0100, Petr Baudis wrote:
> > > > +void move_palace(struct player *pplayer, struct city *pfrom)
> > > > +{
> > > > +  int size;
> > > > +  struct city *pnewcity;
> > > > +
> > > > +  size = city_list_size(&pplayer->cities);
> > >
> > > > +  if (size <= 1)
> > > > +    return; /* we can't choose from anything */
> > > 
> > > Can this function called after the player looses its city? Then we can
> > > assert that we have at least one city which have to get the palace.
> > Yes, we can.
> Hmm, looks like you wait for the patch with assertion included :-).
> Here it goes.

I made some changes:
 - add GAME_*_SAVEPALACE
 - rewrote build_free_palace to
   * recalculate all cities
   * send the city infos
   * send a message
 - changed the place where build_free_palace is called
 - shortened the short description to be less than 42 chars
 - changed SSET_META to SSET_RULES_FLEXIBLE

It all started very innocent: some changes here, some changes there
and at the end I have rewritten the patch. Mhh.

Please test/review.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
    1) Customers cause problems.
    2) Marketing is trying to create more customers.
  Therefore:
    3) Marketing is evil.

Attachment: save_palace2.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: [PATCH] Re: All cities have trade of 0 (PR#1070), Raimar Falke <=