[Freeciv-Dev] (PR#6378) Disable buy command when nothing more to buy (gt
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#6378) Disable buy command when nothing more to buy (gtk2) |
From: |
"Remi Bonnet" <remi.bonnet@xxxxxxxxxxx> |
Date: |
Thu, 2 Oct 2003 09:57:28 -0700 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
In the gtk2 client, when the production is completed over the maximum,
you can still 'buy' the production. So you get the message 'Do you want
to buy X for 0 gold'.
This patch fix this behaviour.
--- ../freeciv/client/gui-gtk-2.0/citydlg.c 2003-09-09 23:36:27.000000000
+0200
+++ ./client/gui-gtk-2.0/citydlg.c 2003-10-02 18:44:44.000000000 +0200
@@ -2366,6 +2366,11 @@
}
value = city_buy_cost(pdialog->pcity);
+ /* If value = 0, the production is probably already complete, so return */
+ if (value == 0) {
+ return;
+ }
+
if (game.player_ptr->economic.gold >= value) {
shell = gtk_message_dialog_new(GTK_WINDOW(pdialog->shell),
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#6378) Disable buy command when nothing more to buy (gtk2),
Remi Bonnet <=
|
|