Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: UnitType check patch
Home

[Freeciv-Dev] Re: UnitType check patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: UnitType check patch
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Fri, 22 Mar 2002 00:34:16 +0000 (WET)

On Thu, 21 Mar 2002, Raimar Falke wrote:

> On Thu, Mar 21, 2002 at 12:27:24AM +0000, Vasco Alexandre Da Silva Costa 
> wrote:
> > Hello,
> > 
> > The AI considers building certain units using best_role_unit() calls. The
> > problem is, it doesn't check if unit with these roles actually are
> > available for building with the current units.ruleset.
> 
> > This caused problems on some modpacks with didn't have units with
> > F_SETTLERS and F_CITIES for example.
> 
> These modpacks doesn't make it through the checks of server/ruleset.c:

In this particular modpack, units with F_CITIES, F_SETTLERS, have tech
requirements. So they can't always be built. In fact, they require a
non-reachable tech IIRC.

>   /* Check some required flags and roles etc: */
>   if(num_role_units(F_CITIES)==0) {
>     freelog(LOG_FATAL, "No flag=cities units? (%s)", filename);
>     exit(EXIT_FAILURE);
>   }
>   if(num_role_units(F_SETTLERS)==0) {
>     freelog(LOG_FATAL, "No flag=settler units? (%s)", filename);
>     exit(EXIT_FAILURE);
>   }
>   if(num_role_units(L_EXPLORER)==0) {
>     freelog(LOG_FATAL, "No role=explorer units? (%s)", filename);
>     exit(EXIT_FAILURE);
>   }
> ....

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa





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