Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2005:
[Freeciv-Dev] (PR#5377) Documentation: buying/selling and changing produ
Home

[Freeciv-Dev] (PR#5377) Documentation: buying/selling and changing produ

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rt-guest@xxxxxxxxxxx, ue80@xxxxxxxxxxxxxxxxxxx
Cc: freeciv-data@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#5377) Documentation: buying/selling and changing production in new cities
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 1 Feb 2005 23:00:11 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=5377 >

> [ue80@xxxxxxxxxxxxxxxxxxx - Tue Aug 20 17:57:51 2002]:

> When you disband a unit or help wonderproduction with caravan in a new
> city and want to change the production the following message will turn
> up:
> Game: You have bought this turn, can't change.
> 
> What should be changed and what not?

Yeah, this is a bug.

It should be fixed by setting newly-built and newly-conquered cities so
that did_buy isn't set.  This is pretty easy; attached is a partial patch.

However I need a savegame where I can quickly conquer a city to test out
newly-conquered cities.

-jason

? diff
Index: client/citydlg_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/citydlg_common.c,v
retrieving revision 1.58
diff -u -r1.58 citydlg_common.c
--- client/citydlg_common.c     2 Feb 2005 02:44:31 -0000       1.58
+++ client/citydlg_common.c     2 Feb 2005 06:59:56 -0000
@@ -738,6 +738,7 @@
 bool city_can_buy(const struct city *pcity)
 {
   return (can_client_issue_orders()
+         && pcity->turn_founded < game.turn
          && !pcity->did_buy
          && city_buy_cost(pcity) > 0);
 }
Index: common/city.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/city.c,v
retrieving revision 1.309
diff -u -r1.309 city.c
--- common/city.c       2 Feb 2005 02:44:31 -0000       1.309
+++ common/city.c       2 Feb 2005 06:59:58 -0000
@@ -2521,7 +2521,7 @@
     }
   }
   pcity->turn_founded = game.turn;
-  pcity->did_buy = TRUE;
+  pcity->did_buy = FALSE;
   pcity->did_sell = FALSE;
   pcity->airlift = FALSE;
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#5377) Documentation: buying/selling and changing production in new cities, Jason Short <=