Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] (PR#10214) remove EFT_NO_UPKEEP
Home

[Freeciv-Dev] (PR#10214) remove EFT_NO_UPKEEP

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10214) remove EFT_NO_UPKEEP
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Sep 2004 13:15:02 -0700
Reply-to: rt@xxxxxxxxxxx

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

This patch removes EFT_NO_UPKEEP.

- It is supported in code but nobody uses it.
- It is logically equivalent to UPKEEP_FREE.

I also changed UPKEEP_FREE to apply at building range, so you can have a 
"local" effect of UPKEEP_FREE if you wanted (for instance to make 
courthouse free under democracy).

jason

? freeciv.spec
? settler_recursion_crash
Index: ai/aicity.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aicity.c,v
retrieving revision 1.166
diff -u -r1.166 aicity.c
--- ai/aicity.c 20 Sep 2004 13:27:08 -0000      1.166
+++ ai/aicity.c 20 Sep 2004 20:13:46 -0000
@@ -243,7 +243,6 @@
          case EFT_TRADE_INC_TILE:
          case EFT_FOOD_INC_TILE:
          case EFT_TRADE_ADD_TILE:
-         case EFT_NO_UPKEEP:
          case EFT_PROD_INC_TILE:
          case EFT_PROD_PER_TILE:
          case EFT_PROD_ADD_TILE:
Index: ai/aidata.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aidata.c,v
retrieving revision 1.41
diff -u -r1.41 aidata.c
--- ai/aidata.c 20 Sep 2004 20:05:50 -0000      1.41
+++ ai/aidata.c 20 Sep 2004 20:13:46 -0000
@@ -92,7 +92,6 @@
       case EFT_TRADE_INC_TILE:
       case EFT_TRADE_PER_TILE:
       case EFT_UPKEEP_FREE:
-      case EFT_NO_UPKEEP:
       effect_list_iterate(*get_building_effects(id, *ptype), peff) {
         ai->impr_calc[id] = AI_IMPR_CALCULATE;
         if (peff->range > ai->impr_range[id]) {
Index: common/capstr.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/capstr.c,v
retrieving revision 1.186
diff -u -r1.186 capstr.c
--- common/capstr.c     12 Sep 2004 21:44:10 -0000      1.186
+++ common/capstr.c     20 Sep 2004 20:13:47 -0000
@@ -73,7 +73,7 @@
  * are not directly related to the capability strings discussed here.)
  */
 
-#define CAPABILITY "+Freeciv.Devel.2004.Sep.12"
+#define CAPABILITY "+Freeciv.Devel.2004.Sep.20"
 
 void init_our_capability(void)
 {
Index: common/city.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/city.c,v
retrieving revision 1.245
diff -u -r1.245 city.c
--- common/city.c       15 Sep 2004 09:54:01 -0000      1.245
+++ common/city.c       20 Sep 2004 20:13:47 -0000
@@ -516,10 +516,7 @@
   if (is_wonder(i))
     return 0;
   if (improvement_types[i].upkeep
-      <= get_city_bonus(pcity, EFT_UPKEEP_FREE)) {
-    return 0;
-  }
-  if (get_building_bonus(pcity, i, EFT_NO_UPKEEP) > 0) {
+      <= get_building_bonus(pcity, i, EFT_UPKEEP_FREE)) {
     return 0;
   }
   
Index: common/effects.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/effects.c,v
retrieving revision 1.10
diff -u -r1.10 effects.c
--- common/effects.c    13 Sep 2004 18:14:19 -0000      1.10
+++ common/effects.c    20 Sep 2004 20:13:47 -0000
@@ -126,7 +126,6 @@
   "Sea_Defend",
   "Air_Defend",
   "Missile_Defend",
-  "No_Upkeep",
   "No_Incite"
 };
 
Index: common/effects.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/effects.h,v
retrieving revision 1.7
diff -u -r1.7 effects.h
--- common/effects.h    13 Sep 2004 15:54:51 -0000      1.7
+++ common/effects.h    20 Sep 2004 20:13:47 -0000
@@ -112,7 +112,6 @@
   EFT_SEA_DEFEND,
   EFT_AIR_DEFEND,
   EFT_MISSILE_DEFEND,
-  EFT_NO_UPKEEP,
   EFT_NO_INCITE,
   EFT_LAST     /* keep this last */
 };

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#10214) remove EFT_NO_UPKEEP, Jason Short <=