Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2000:
[Freeciv-Dev] Re: transform to ocean
Home

[Freeciv-Dev] Re: transform to ocean

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: transform to ocean
From: Thue Janus Kristensen <thue@xxxxxxx>
Date: Wed, 24 May 2000 17:19:30 +0200

On Wed, 24 May 2000, Jeff Mallatt wrote:
> 
> I've attached a fixed-up patch.
> 
> At 2000/05/23 14:54 , Thue Janus Kristensen wrote:
> >-Remove rivers from tiles transformed to ocean.
> 
> This was put in clear_infrastructure().  But, a river is not
> infrastructure.  So, I moved it to the places where clear_infrastructure()
> is called.
> 
> I also commented it as needing to be removed when the rest of the code can
> handle rivers on ocean tiles.  I think we should leave rivers where they
> are: in the case of land->ocean->land circular changes, the river should
> reappear.  This requires the rest of the code to distinguish real rivers
> from submerged rivers, which I didn't verify at this time.
>
> >-Disallow transforming below an existing city
> 
> The city check you added was to the code that checked the reverse change --
> that of from ocean to land.  Since cities can't be on ocean, the check here
> is not needed.  I removed it.
> 
> Also, changing from land to ocean beneath a city is already disallowed.

You are right. oups.
Hmm, but I have seen the AI do it! Or at least end up with cities on
ocean, from which I concluded, as it would not build a city on a swamp,
that it terraformed a city square that was turned to swamp by global
warming.
When I had changed the code and seen I couldn't do it I though the code
was then correct and had effect. D'uh. I think we should stop the AI
autosettlers from doing it at all. If my conclusion was right in the
first place the AI autosettlers can probably still terraform it... (or at
the very least they are out of sync trying to do it in the first place)

> >-Reset the activity of settlers transforming to ocean on a square when
> >building a city on top
> 
> Good!  However, both mining and irrigation can also change to ocean, so I
> added these cases.
> 
> >-And then making this patch I once again fell for the misuse of the
> >parameters in create_city() as iterators, so I changed them!
> 
> Excellent!  I'd noticed the "hijacked" comment before, but hadn't gotten
> around to fixing it.
> 
> When you added "const"s to create_city(), you didn't add them to the
> prototype in cityhand.h.  I like the definition and declaration to be
> consistent, so I added them.

You don't have to argue for them to be consistent. I guess I was just a
little too quick making the patch...

-Thue



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