Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#9584) Patch: Don't show "You have bought" if only the
Home

[Freeciv-Dev] (PR#9584) Patch: Don't show "You have bought" if only the

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9584) Patch: Don't show "You have bought" if only the worklist changes
From: "Ciaran Mac Lochlainn" <ciaran17@xxxxxxxxxx>
Date: Mon, 2 Aug 2004 08:52:52 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9584 >

Trying again, with unified diff against cvs head:

If you buy a city's production target and then change the worklist, 
you get the warning "Game: You have bought this turn, can't change."

This behaviour is appropriate if you are trying to change the 
production target, but not if you are only changing the worklist.

This patch is intended to stop the message appearing unless you try to 
change the target after buying it.

Index: cityhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityhand.c,v
retrieving revision 1.132
diff -u -r1.132 cityhand.c
--- cityhand.c  2 Jun 2004 22:54:15 -0000       1.132
+++ cityhand.c  2 Aug 2004 15:51:04 -0000
@@ -344,7 +344,8 @@
      return;
    if (!is_build_id_unit_id && !can_build_improvement(pcity, build_id))
      return;
-  if (pcity->did_buy && pcity->shield_stock > 0) {
+  if (pcity->did_buy && pcity->shield_stock > 0 &&
+       pcity->currently_building != build_id) {
     notify_player_ex(pplayer, pcity->x, pcity->y, E_NOEVENT,
                     _("Game: You have bought this turn, can't change."));
     return;

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