(PR#5377) Documentation: buying/selling and changing production in new cities

"Jason Short" <[email protected]> Tue, 1 Feb 2005 23:00:11 -0800
Newsgroups gmane.games.freeciv.devel,gmane.games.freeciv.data
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1107327611-30076-9
Content-Type: text/plain; charset="utf-8"


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

> [ue80-L38z05uLna+pU24hk/[email protected] - 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


------------=_1107327611-30076-9
Content-Type: text/x-patch; charset="ascii"; name="did_buy.diff"
Content-Disposition: inline; filename="did_buy.diff"
Content-Transfer-Encoding: 7bit

? 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;
 

------------=_1107327611-30076-9--