[Freeciv-Dev] Re: [PATCH] city_landlocked_sell_coastal_improvements gene
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Aug 30, 2002 at 06:26:36PM -0700, Per I. Mathisen wrote:
> On Tue, 21 May 2002, Ben Webb wrote:
> > Here's a modified version of the landlock patch. It now uses the
> > "nice" impr_type_iterate macro to iterate through all improvements (in a
> > recently-landlocked city) that are candidates for auto-selling.
> Why should this be done automatically?
Why are you asking me? This is what is done in the current code;
I'm merely generalising it. But bear in mind that city improvements in
Freeciv do not have requirements for their activity - only for their
being built in the first place. For example, you need adjacent Ocean
tiles to _build_ a Port, but the code does not later check if you have
adjacent Ocean tiles before agreeing to repair ships in that city.
Getting rid of improvements that no longer have their build requirements
satisfied removes the necessity for such checks in the code - I'm
guessing this is why it was done originally.
> And if it should be done automatically, why should it be sold and not
> lost without compensation?
Because you could sell the building yourself, in the turn before
the city became landlocked, and get the cash. Having the game penalise
you for forgetting to do this would just be a nuisance.
"It is a capital mistake to theorize before one has data."
- Sir Arthur Conan Doyle