Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] (PR#6179) more rigorous handling of transported_by
Home

[Freeciv-Dev] (PR#6179) more rigorous handling of transported_by

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6179) more rigorous handling of transported_by
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Sep 2003 12:48:11 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[jdorje - Wed Sep 17 03:53:20 2003]:

> This patch primarily adds a couple of sanity checks on the 
> transported_by field.
> 
> Secondarily it makes two code changes that allow these sanity checks to 
> pass:
> 
> 1.  Barbarians created on ships must be transported by the ship.
> 
> 2.  When moving a ground unit onto ocean, find a transporter for it.
> 
> This should ensure that the transported_by field has a valid value, 
> which will allow PR#5789 to go forward.  It should also allow the 
> removal of some or most (not all - see Per's explanation in PR#6174) 
> calls to assign_unit_to_transport.
> 
> The only issue is that the sanity check may have some rules issues.  It 
> declares that a ground unit in the ocean must be transported by a 
> non-ground unit: it cannot be transported by another ground unit which 
> is then transported by a non-ground unit.  This is the case under the 
> default ruleset (which has no transporters that are ground units) but 
> possibly not under alternate rulesets.  What _should_ be the behavior in 
> this case?  Should we allow recursive transporting?
> 
> My suggestion is that a transporter with a capacity of C should use C+1 
> "spots" if you put it in another transporter.  This makes some sense to 
> me from a realism perspective, and prevents recursive transporting.  It 
> also makes the problem simpler from a technical perspective.

This new version of the patch should work with ocean cities.

jason

Attachment: transports-3.diff
Description: transports-3.diff


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