Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8796) bug(s) in city_increase_size
Home

[Freeciv-Dev] Re: (PR#8796) bug(s) in city_increase_size

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8796) bug(s) in city_increase_size
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Fri, 21 May 2004 22:25:21 -0700
Reply-to: rt@xxxxxxxxxxx

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

On Fri, May 21, 2004 at 01:39:43PM -0700, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8796 >
> 
> There are several problems with city_increase_size:
> 
> - It hard-codes the minimum city size for taxmen and scientists as 5.
> 
> - If auto-arrange-workers is called, the extra citizen is first made a 
> taxman.  This may leave the city in a non-sane state if the population 
> is too low.  It is fixed in the call to auto_arrange_workers but there's 
> no guarantee that we won't hit a sanity check in the meantime.  The 
> solution is easy: just make the extra citizen an elvis.  It makes no 
> difference since auto_arrange_workers will change it anwyay.

With the attached patch the extra citizen can be always be placed and
it is made general.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "On the eigth day, God started debugging"

Index: server/ruleset.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/ruleset.c,v
retrieving revision 1.172
diff -u -u -r1.172 ruleset.c
--- server/ruleset.c    21 May 2004 19:03:44 -0000      1.172
+++ server/ruleset.c    22 May 2004 05:23:48 -0000
@@ -2520,6 +2520,12 @@
     freelog(LOG_FATAL, "Forced taxes do not add up in ruleset!");
     exit(EXIT_FAILURE);
   }
+  if (game.rgame.min_size_elvis > 0 && game.rgame.min_size_taxman > 0
+      && game.rgame.min_size_scientist > 0) {
+    freelog(LOG_FATAL, "At least one specialist must be available without "
+           "city size restriction!");
+    exit(EXIT_FAILURE);
+  }
 
   /* City Parameters */
 

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