Complete.Org: Mailing Lists: Archives: freeciv-dev: December 1998:
[Freeciv-Dev] Patch: Change city rapture size.
Home

[Freeciv-Dev] Patch: Change city rapture size.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Patch: Change city rapture size.
From: Tony & <stuckey@xxxxxxxxxxxxxxxxx>
Date: Sun, 20 Dec 1998 02:51:31 -0600

        Civilization 1 and 2 document that cities can celebrate at size 3.
Freeciv historically implements size 5, and hard codes this value as a
number, not a #define.

Index: common/city.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/city.h,v
retrieving revision 1.22
diff -u -r1.22 city.h
--- city.h      1998/11/27 11:12:50     1.22
+++ city.h      1998/12/20 08:13:13
@@ -56,7 +56,7 @@
 #define get_government(X) (game.players[X].government)
 
 #define CITY_MAP_SIZE 5
-
+#define CITY_CELEB_SIZE 3
 
 
 #define city_map_iterate(x, y) \

Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.43
diff -u -r1.43 cityturn.c
--- cityturn.c  1998/12/15 09:51:04     1.43
+++ cityturn.c  1998/12/20 08:13:14
@@ -1175,7 +1176,7 @@
   city_check_workers(pplayer, pcity);
   if (city_refresh(pcity) && 
       get_government(pcity->owner)>=G_REPUBLIC &&
-      pcity->food_surplus>0 && pcity->size>4) {
+      pcity->food_surplus>0 && (pcity->size >= CITY_CELEB_SIZE)) {
     pcity->food_stock=pcity->size*game.foodbox+1; 
   }
 
@@ -1186,18 +1187,20 @@
   } /* putting this lower in the routine would basically be cheating. --
Syela */
 
   city_build_stuff(pplayer, pcity);
-  if (!pcity->was_happy && city_happy(pcity) && pcity->size>4) {
-    notify_player_ex(pplayer, pcity->x, pcity->y, E_CITY_LOVE,
-                 "Game: We Love The %s Day celebrated in %s", 
-                 get_ruler_title(pplayer->government),
-                 pcity->name);
-  }
-  if (!city_happy(pcity) && pcity->was_happy && pcity->size>4) {
-    notify_player_ex(pplayer, pcity->x, pcity->y, E_CITY_NORMAL,
-                 "Game: We Love The %s Day canceled in %s",
-                 get_ruler_title(pplayer->government),
-                 pcity->name);
-
+  if (pcity->size >= CITY_CELEB_SIZE) {
+    if (!pcity->was_happy && city_happy(pcity)) {
+      notify_player_ex(pplayer, pcity->x, pcity->y, E_CITY_LOVE,
+                 "Game: We Love The %s Day celebrated in %s", 
+                 get_ruler_title(pplayer->government),
+                 pcity->name);
+    }
+    else if (!city_happy(pcity) && pcity->was_happy) {
+      notify_player_ex(pplayer, pcity->x, pcity->y, E_CITY_NORMAL,
+                 "Game: We Love The %s Day canceled in %s",
+                 get_ruler_title(pplayer->government),
+                 pcity->name);
+  
+    }
   }
   pcity->was_happy=city_happy(pcity);
     {
-- 
Anthony J. Stuckey                              stuckey@xxxxxxxxxxxxxxxxx
"When I was young, the sky was filled with stars.
 I watched them burn out one by one."  -Warren Zevon


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