[Freeciv-Dev] Re: UnitType check patch
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, Mar 21, 2002 at 08:30:36AM +0100, 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:
>
> /* 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);
> }
> ....
They do if you make a settler and cities unit that isn't available to
anyone....
--
Paul Zastoupil
|
|