Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] (PR#6973) civ3foodbox
Home

[Freeciv-Dev] (PR#6973) civ3foodbox

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#6973) civ3foodbox
From: "James Canete" <use_less@xxxxxxxxxxx>
Date: Fri, 27 Feb 2004 01:09:19 -0800
Reply-to: rt@xxxxxxxxxxx

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

I ended up making the ruleset loading more complicated. :) I put in a
chunk of code to ensure that the granary size is never 0, regardless of
the numbers in granary_food_ini[] or granary_food_inc.

As it is now, the last entry in granary_food_ini[] is where
granary_food_inc kicks in.  This is so the old rulesets don't have to
change to granary_food_ini = 2, granary_food_inc = 100.

To facilitate granary_food_inc starting from 0, I allowed the final
entry in granary_food_ini[] to equal 0.

I also made it so granary_food_inc counts from that point, so there
wouldn't be any large jump when reaching the end of granary_food_ini[].

By the way, granary_food_inc is a percentage, probably so ruleset makers
could have the granary size grow by 50% of game.foodbox or similar
fractions.  And also, is old ruleset compatibility preferred?  This
caused a lot of the ugly-looking code, plus I'd prefer it if these were
referred to as foodbox instead of granary, since to me a granary is an
improvement that affects the foodbox.

-James Canete

Attachment: flexfoodbox-4.diff
Description: Binary data


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