Complete.Org: Mailing Lists: Archives: freeciv-ai: April 2003:
[freeciv-ai] reset cities after govt want check
Home

[freeciv-ai] reset cities after govt want check

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] reset cities after govt want check
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 30 Apr 2003 13:22:05 +0000 (GMT)

Greg mentioned this. I think we should do it, but it is not necessary. The
only negative effect of not doing this is that those who watch the AI will
see the workers in the wrong positions - the AI will rearrange workers
(again!) on turn end anyway.

  - Per

Index: ai/aihand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aihand.c,v
retrieving revision 1.79
diff -u -r1.79 aihand.c
--- ai/aihand.c 2003/04/29 08:40:11     1.79
+++ ai/aihand.c 2003/04/30 13:17:21
@@ -426,8 +426,12 @@
   /* Goodness of the ideal gov is calculated relative to the goodness of the
    * best of the available ones. */
   ai->goal.govt.val -= best_val;
-  /* Now reset our gov to it's real state. */
+  /* Now reset our gov back to it's real state. */
   pplayer->government = current_gov;
+  city_list_iterate(pplayer->cities, acity) {
+    generic_city_refresh(acity, TRUE);
+    auto_arrange_workers(acity);
+    if (ai_fix_unhappy(acity)) {
+      ai_scientists_taxmen(acity);
+    }
+  } city_list_iterate_end;
 }




[Prev in Thread] Current Thread [Next in Thread]
  • [freeciv-ai] reset cities after govt want check, Per I. Mathisen <=