Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2005:
[Freeciv-Dev] (PR#12301) auto_arrange_workers problem
Home

[Freeciv-Dev] (PR#12301) auto_arrange_workers problem

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: haskjold@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#12301) auto_arrange_workers problem
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 27 Feb 2005 10:22:00 -0800
Reply-to: bugs@xxxxxxxxxxx

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

> [haskjold@xxxxxxxxxxx - Sat Feb 19 17:23:49 2005]:
> 
> Hi
> 
> In the attached savegame auto_arrange_workers gets a bit confused. It
> changes all the workers in the cities "Narvik" and "Tromsø" to
> scientists. This is with CVS HEAD compiled today (feb 19 2005).

This patch should fix it (for both branches).

-jason

? server/foo
Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.298
diff -u -r1.298 cityturn.c
--- server/cityturn.c   23 Feb 2005 03:34:06 -0000      1.298
+++ server/cityturn.c   27 Feb 2005 18:17:02 -0000
@@ -249,11 +249,6 @@
     cm_query_result(pcity, &cmp, &cmr);
   }
   if (!cmr.found_a_valid) {
-    cmp.minimal_surplus[O_FOOD] = -(pcity->food_stock);
-    cmp.minimal_surplus[O_TRADE] = -FC_INFINITY;
-    cm_query_result(pcity, &cmp, &cmr);
-  }
-  if (!cmr.found_a_valid) {
     /* Emergency management.  Get _some_ result.  This doesn't use
      * cm_init_emergency_parameter so we can keep the factors from
      * above. */
? data/nation/byzantium.ruleset
? data/nation/venezuelan.ruleset
Index: data/default/nations.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/default/nations.ruleset,v
retrieving revision 1.70.2.1
diff -u -r1.70.2.1 nations.ruleset
--- data/default/nations.ruleset        26 Oct 2004 14:54:00 -0000      1.70.2.1
+++ data/default/nations.ruleset        27 Feb 2005 18:22:00 -0000
@@ -120,7 +120,8 @@
 *include "nation/taiwanese.ruleset"
 *include "nation/phoenician.ruleset"
 *include "nation/bosnia.ruleset"
-
+*include "nation/byzantium.ruleset"
+*include "nation/venezuelan.ruleset"
 ;
 ; observer and barbarians MUST go last in THIS order
 ;
Index: data/nation/czech.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/czech.ruleset,v
retrieving revision 1.7
diff -u -r1.7 czech.ruleset
--- data/nation/czech.ruleset   24 Jul 2004 12:26:06 -0000      1.7
+++ data/nation/czech.ruleset   27 Feb 2005 18:22:01 -0000
@@ -5,10 +5,10 @@
 class=_("Modern")
 legend=_("Today's Czech Republic was until 1993 part of Czechoslovakia, \
 which had been until 1918 part of the Austro-Hungarian Empire.")
-leader = "Jan Lucembursky", "Otakar II", "Karel IV", "Vaclav", "Jiri z 
Podebrad",
-         "Jan Zizka", "Jan Hus", "Zavis z Falknstejna", "Libuse",
-         "Kunhuta", "Alzbeta Pomoranska", "Eliska Premyslovna", "Anezka",
-         "T. G. Masaryk", "Edvard Benes", "Vaclav Havel"
+leader = "Jan Lucemburský", "Otakar II", "Karel IV", "Václav", "Jiří z 
Poděbrad",
+         "Jan Žižka", "Jan Hus", "Záviš z Falknštejna", "Libuše",
+         "Kunhuta", "Alžběta Pomořanská", "Eliška Přemyslovna", "Anežka",
+         "T. G. Masaryk", "Edvard Beneš", "Václav Havel"
 leader_sex = "Male", "Male", "Male", "Male", "Male",
         "Male", "Male", "Male", "Female",
         "Female", "Female", "Female", "Female",
@@ -34,26 +34,26 @@
 civilwar_nations = "croatian"
 
 cities =
-        "Praha", "Brno", "Ostrava", "Plzen", "Hradec Kralove",
-        "Olomouc", "Ceske Budejovice", "Usti nad Labem", "Opava",
-        "Most", "Pardubice", "Jihlava", "Chomutov", "Prerov",
-        "Teplice", "Frydek Mistek", "Znojmo", "Cheb", "Zlin",
-        "Karlovy Vary", "Uherske Hradiste", "Kolin", "Hodonin",
-        "Mlada Boleslav", "Pribram", "Sumperk", "Pisek",
-        "Litomerice", "Trebic", "Vyskov", "Kromeriz", "Klatovy",
-        "Havlickuv Brod", "Prostejov", "Chrudim", "Louny", "Decin",
-        "Rokycany", "Nachod", "Beroun", "Rakovnik", "Melnik",
-        "Novy Jicin", "Tachov", "Strakonice", "Kutna Hora",
-        "Bruntal", "Trutnov", "Sokolov", "Pelhrimov", "Nymburk",
-        "Svitavy", "Usti nad Orlici", "Jicin", "Tabor",
-        "Domazlice", "Jindrichuv Hradec", "Ceska Lipa", "Benesov",
-        "Liberec", "Rychnov nad Kneznou", "Cesky Krumlov",
-        "Prachatice", "Semily", "Zdar nad Sazavou", "Vsetin",
-        "Osek", "Litomysl", "Velehrad", "Tesin", "Rozmberk",
-        "Tovacov", "Sezimovo Usti", "Horice", "Kourim",
-        "Podebrady", "Vilemov", "Kunvald", "Dvur Kralove",
-        "Bezdez", "Trebon", "Sternberk", "Sazava", "Slany",
-        "Stara Boleslav", "Kunstat", "Zelena Hora", "Duchcov",
-        "Zatec", "Kladsko", "Horazdovice", "Caslav", "Pirkstejn",
-        "Krnov", "Rozmital", "Loket", "Kladno",
-        "Jablonec nad Nisou", "Breclav", "Blansko", "Karvina"
+        "Praha", "Brno", "Ostrava", "Plzeň", "Hradec Králové",
+        "Olomouc", "České Budějovice", "Ústí nad Labem", "Opava",
+        "Most", "Pardubice", "Jihlava", "Chomutov", "Přerov",
+        "Teplice", "Frýdek Místek", "Znojmo", "Cheb", "Zlín",
+        "Karlovy Vary", "Uherské Hradiště", "Kolín", "Hodonín",
+        "Stará Boleslav", "Příbram", "Šumperk", "Písek",
+        "Litoměřice", "Třebíč", "Vyškov", "Kroměříž", "Klatovy",
+        "Havlíčkův Brod", "Prostějov", "Chrudim", "Louny", "Děčín",
+        "Rokycany", "Náchod", "Beroun", "Rakovník", "Mělník",
+        "Jičín", "Tachov", "Strakonice", "Kutná Hora",
+        "Bruntál", "Trutnov", "Sokolov", "Pelhřimov", "Nymburk",
+        "Svitavy", "Ústí nad Orlicí", "Nový Jičín", "Tábor",
+        "Domažlice", "Jindřichův Hradec", "Česká Lípa", "Benešov",
+        "Liberec", "Rychnov nad Kněžnou", "Český Krumlov",
+        "Prachatice", "Semily", "Žďár nad Sázavou", "Vsetín",
+        "Osek", "Litomyšl", "Velehrad", "Těšín", "Rožmberk",
+        "Tovačov", "Sezimovo Ústí", "Hořice", "Kouřim",
+        "Poděbrady", "Vilémov", "Kunvald", "Dvůr Králové",
+        "Bezděz", "Třeboň", "Šternberk", "Sázava", "Slaný",
+        "Mladá Boleslav", "Kunštát", "Zelená Hora", "Duchcov",
+        "Žatec", "Kladsko", "Horažďovice", "Čáslav", "Pirkštejn",
+        "Krnov", "Rožmitál", "Loket", "Kladno",
+        "Jablonec nad Nisou", "Břeclav", "Blansko", "Karviná"
Index: data/nation/polish.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/nation/polish.ruleset,v
retrieving revision 1.16.2.1
diff -u -r1.16.2.1 polish.ruleset
--- data/nation/polish.ruleset  19 Oct 2004 09:22:02 -0000      1.16.2.1
+++ data/nation/polish.ruleset  27 Feb 2005 18:22:02 -0000
@@ -57,7 +57,7 @@
        "Gorzów",
        "Zielona Góra (hills, forest)",
        "Poznań",
-       "Łódź",
+       "Łódz",
        "Lublin",
        "Kielce",
        "Opole",
Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.267.2.10
diff -u -r1.267.2.10 cityturn.c
--- server/cityturn.c   21 Dec 2004 22:57:26 -0000      1.267.2.10
+++ server/cityturn.c   27 Feb 2005 18:22:03 -0000
@@ -270,12 +270,6 @@
       cm_query_result(pcity, &cmp, &cmr);
 
       if (!cmr.found_a_valid) {
-       cmp.minimal_surplus[FOOD] = -(pcity->food_stock);
-       cmp.minimal_surplus[TRADE] = -FC_INFINITY;
-       cm_query_result(pcity, &cmp, &cmr);
-      }
-
-      if (!cmr.found_a_valid) {
        /* Emergency management.  Get _some_ result.  This doesn't use
         * cm_init_emergency_parameter so we can keep the factors from
         * above. */

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