Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2004:
[Freeciv-Dev] (PR#9523) PATCH: If a city is building an obsolete wonder,
Home

[Freeciv-Dev] (PR#9523) PATCH: If a city is building an obsolete wonder,

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9523) PATCH: If a city is building an obsolete wonder, notify player
From: "Ciaran Mac Lochlainn" <ciaran17@xxxxxxxxxx>
Date: Tue, 27 Jul 2004 16:11:02 -0700
Reply-to: rt@xxxxxxxxxxx

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

A patch and a question.

This patch adds code to city_build_building which will check whether 
the city is building a wonder which has become obsolete.  If so, it 
warns the player.

The city will continue building the wonder unless the player changes 
production, as this could be what the player wants - he/she/it could 
be working towards a future wonder without already having the 
technology researched.  Or it could be an omission which the player 
would otherwise regret.

Should this warning be E_CITY_CANTBUILD, or would it be more 
appropriate to use a different event?  How would AI react to this 
situation?


--- cityturn.org.c      2004-07-27 23:22:52.000000000 +0100
+++ cityturn.c  2004-07-27 23:27:32.000000000 +0100
@@ -923,6 +923,20 @@
                                                   currently_building));
     return TRUE;
   }
+
+  /* If the city is building an obsolete wonder, notify the player.
+   * Fixme??: given that the city continues building the wonder,
+   * is E_CITY_CANTBUILD suitable?  */
+  if (is_wonder(pcity->currently_building) && 
+     wonder_obsolete(pcity->currently_building)) {
+    notify_player_ex(pplayer, pcity->x, pcity->y, E_CITY_CANTBUILD,
+                    _("Game: %s is building %s, which "
+                      "is now obsolete."),
+                    pcity->name, get_impr_name_ex(pcity,
+                                                  pcity->
+                                                  currently_building));
+    
+  }
   if (pcity->shield_stock
       >= impr_build_shield_cost(pcity->currently_building)) {
     if (pcity->currently_building == B_PALACE) {

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#9523) PATCH: If a city is building an obsolete wonder, notify player, Ciaran Mac Lochlainn <=