Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] Re: (PR#12703) bug: harbour not giving food?
Home

[Freeciv-Dev] Re: (PR#12703) bug: harbour not giving food?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#12703) bug: harbour not giving food?
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 2 Apr 2005 18:09:11 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12703 >

Patch attached.

Index: common/requirements.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/requirements.h,v
retrieving revision 1.6
diff -b -u -p -r1.6 requirements.h
--- common/requirements.h       30 Mar 2005 22:01:16 -0000      1.6
+++ common/requirements.h       3 Apr 2005 02:08:07 -0000
@@ -41,13 +41,14 @@ enum req_range {
   REQ_RANGE_LAST   /* keep this last */
 };
 
-/* An requirement is targeted at a certain target type.  For building and
+/* A requirement is targeted at a certain target type.  For building and
  * unit reqs the target will be a city; for tech reqs it will be a player;
  * for effect reqs it may be anything. */
 enum target_type {
   TARGET_WORLD,
   TARGET_PLAYER,
   TARGET_CITY,
+  TARGET_TILE,
   TARGET_BUILDING 
 };
 
Index: common/effects.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/effects.c,v
retrieving revision 1.25
diff -b -u -p -r1.25 effects.c
--- common/effects.c    30 Mar 2005 22:01:16 -0000      1.25
+++ common/effects.c    3 Apr 2005 02:08:07 -0000
@@ -750,7 +750,7 @@ int get_city_bonus(const struct city *pc
 int get_city_tile_bonus(const struct city *pcity, const struct tile *ptile,
                        enum effect_type effect_type)
 {
-  return get_target_bonus_effects(NULL, TARGET_CITY,
+  return get_target_bonus_effects(NULL, TARGET_TILE,
                                  city_owner(pcity), pcity, B_LAST, ptile,
                                  effect_type);
 }
Index: common/requirements.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/requirements.c,v
retrieving revision 1.9
diff -b -u -p -r1.9 requirements.c
--- common/requirements.c       30 Mar 2005 22:01:16 -0000      1.9
+++ common/requirements.c       3 Apr 2005 02:08:07 -0000
@@ -317,6 +317,8 @@ static bool is_target_possible(enum targ
     return (range >= REQ_RANGE_PLAYER);
   case TARGET_CITY:
     return (range >= REQ_RANGE_CITY);
+  case TARGET_TILE:
+    return (range >= REQ_RANGE_LOCAL);
   case TARGET_BUILDING:
     return (range >= REQ_RANGE_LOCAL);
   }

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