Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] Re: (PR#12997) [PATCH] Generic no sink deep loss effect
Home

[Freeciv-Dev] Re: (PR#12997) [PATCH] Generic no sink deep loss effect

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: vasc@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12997) [PATCH] Generic no sink deep loss effect
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 6 May 2005 19:46:39 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12997 >

Vasco Alexandre da Silva Costa wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12997 >
> 
> This patch makes the no sink deep effect generic. Instead of hardcoding
> to check the F_TRIREME flag in the C code, it uses effects to do the check.

How does this work with modified sink percentages?

> There are only two lingering F_TRIREME checks left. One is a unit type
> check and the other for the, as usual, annoyingly harcoded help.

Put the helptext into the ruleset itself.

> -  if ((likely_ocean(ptile, pplayer) < 50) || 
> -      is_likely_coastline(ptile, pplayer) ||
> -      get_unit_bonus(punit, EFT_NO_SINK_DEEP) > 0) {
> +  if (get_unit_bonus(punit, EFT_NO_SINK_DEEP) > 0 ||
> +      likely_ocean(ptile, pplayer) < 50 || 
> +      is_likely_coastline(ptile, pplayer)) {

Bad style.

-jason





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