[Freeciv-Dev] (PR#6973) civ3foodbox
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<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
flexfoodbox-4.diff
Description: Binary data
|
|