[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 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);
}
....
Raimar
--
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#
|
|