Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2000:
[Freeciv-Dev] Re: Land Reclamation
Home

[Freeciv-Dev] Re: Land Reclamation

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Land Reclamation
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Thu, 06 Apr 2000 11:42:32 -0400

At 2000/04/03 21:51 , Cameron Morland wrote:
>On Mon, 3 Apr 2000, Cameron Morland wrote:
>> I have posted two patches that allow transformation of ocean tiles with
>> three adjacent land squares. They are at
>> http://www.eng.uwaterloo.ca/student/cjmorlan/freeciv/listing.html
>> My next step is to check for harbours and platforms. They will be sold if
>> a city becomes landlocked.
>Ok, this is done, though I think it's not implemented in a very good way.
>The result is landlocked.diff

The attached patch merges the above three patches, and does:

- Adds a capability string.

- Doesn't access tile_types[] directly in can_unit_do_activity_targeted().
Uses the already existing local variable "type", which is fetched by the
standard accessor function.

- Changed to allow any of mine/irrigate/transform to be able to "reclaim"
ocean.  (Always under control of the terrain.ruleset, of course.)

- Makes can_reclaim_ocean() static.

- Makes the number of "land" tiles required by can_reclaim_ocean() a value
specified by the terrain.ruleset file.

- Renames move_unit_list_to_tile() to transporter_cargo_move_to_tile(),
because move_unit_list_to_tile() sounds generic, and it is now very much
not generic.  Also, moved it to unithand.c and made it static.

- Changed transporter_cargo_move_to_tile() to reset any non-IDLE/SENTRY
unit to IDLE.  Also, whenever it changes activity, it needs to send the
unit info.

- Implemented the "landlocked sell-off" code for all possible terrain
changes from ocean to land.

- Fixed the way to compute the number of elements in an array.

- Fixed bug where you had assumed that the player that owns the unit also
owns the landlocked city.

- Does some clean-up in can_unit_do_activity_targeted(): moved two
"if(activity==" statements into the body of the "switch(activity)".

- Verifies that can_reclaim_ocean() does work for any location.

- Updates all of the terrain.ruleset files.  Only the default ruleset
allows for ocean reclamation (with 3 adjacent land tiles).

Attachment: terrain-ruleset-fix-7.diff.gz
Description: Binary data

jjm

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