Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] (PR#6455) Growth fix for auto_arrange_workers
Home

[Freeciv-Dev] (PR#6455) Growth fix for auto_arrange_workers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6455) Growth fix for auto_arrange_workers
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Thu, 9 Oct 2003 06:53:51 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Someone complained that the new auto_arrange_workers did not give cities
enough food to grow. Here is a patch that should fix this. Please try it
out.

  - Per

Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.227
diff -u -r1.227 cityturn.c
--- server/cityturn.c   8 Oct 2003 16:56:07 -0000       1.227
+++ server/cityturn.c   9 Oct 2003 13:52:05 -0000
@@ -180,7 +180,13 @@
 
   /* WAGs. These are set for both AI and humans.
    * FIXME: Adjust & remove kludges */
-  cmp.factor[FOOD] = ai->food_priority - 9;
+  if (pcity->size > 1) {
+    cmp.factor[FOOD] = ai->food_priority - 9;
+  } else {
+    /* Growing to size 2 is priority #1, since then we have the
+     * option of making settlers. */
+    cmp.factor[FOOD] = 20;
+  }
   cmp.factor[SHIELD] = ai->shield_priority - 7;
   cmp.factor[TRADE] = 10;
   cmp.factor[GOLD] = ai->gold_priority - 11;

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6455) Growth fix for auto_arrange_workers, Per I. Mathisen <=