Summary: On trunk, transforming any tile bordering lake turns
lake to ocean
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Thu Aug  9 23:37:24 2012
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: In Progress
             Assigned to: jtn
        Originator Email: 
             Open/Closed: Open
                 Release: trunk r
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 2.5.0



Since patch #3478, as noted in that bug's comment 6
<http://gna.org/patch/?3478#comment6> and in bug #20038.

cazfi suggests a solution:
> 1) Fix flooding to happen also *towards* the transformed tile 
> if it's freshwater and there's adjacent ocean tile
> 2) Make transform_to in all supplied rulesets (and document 
> for custom ones) "Lake"
> - If one then transforms next to lake -> (s)he gets lake
> - If one transforms next to ocean -> (s)he gets lake that is 
> then immediately flooded with ocean from adjacent tile. 
> Temporary lake should not be user-visible at any point.

Attached patch implements this. Notes:
* For (1), I've used most_shallow_ocean() as the replacement for the lake,
rather than propagating one of the nearest ocean types, as I didn't want the
possibility of Deep Ocean propagating all the way into an inland lake.
* For (2), as well as unit transformations, I've also changed the global
warming terrain changes from foo->Ocean to foo->Lake. So global warming now
grows lakes (perhaps a bit counterintuitive) whereas in S2_4 it would leave
ocean next to lake, and in trunk prior to this patch it would always introduce
salinity to whole lakes (a bit harsh).
* This has the effect that terrain help, menus etc say "Transform to Lake".
** Hopefully this won't confuse the AI in rulesets where freshwater is
advantageous? I could imagine it endlessly transforming its coasts in the hope
that it'll get a juicy lake. But I don't know if it ever even considers such
* The user will not see the intermediate step, but there is one way in which
it might become apparent. The "foo -> Lake" step will go through
tile_change_terrain(), which will do things like clear incompatible bases,
etc. If, say, a base was compatible with "foo" and "Ocean" but not "Lake", it
would be lost. (But the previous point means the user should have a clue why.)
Probably too unlikely to be worth worrying about.
* I've also changed the pre-existing flooding from using tile_set_terrain() to
tile_change_terrain(). I think this makes more sense as it takes care of
removing unsuitable bases, etc (salmon farm ;).


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to