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

[Freeciv-Dev] Re: UnitType check patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: UnitType check patch
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Mar 2002 08:30:36 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

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:

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


 email: rf13@xxxxxxxxxxxxxxxxx
 "How about the new language C&? No, that's not 'c ampersand', 'c reference', 
  'reference to c' or 'c and'. It's pronounced 'campersand', to confuse the 
  hell out of people who are unfamiliar with it, and it will, of course, 
  have no pointers."
    -- Xazziri in comp.lang.c++ about C#

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