[Freeciv-Dev] Re: [patch rfd] loading rulesets
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, 22 Feb 2002, Raahul Kumar wrote:
> > - no more "set techs 3" server crashes
>
> I did not pick that up in the patch. Which lines were these?
Those that deleted the "set techs" feature. All those "set" options which
set ruleset files to something else have been taken out and shot. So now
they can't cause any errors :)
> Basically, you got rid of the default ruleset directory, and everything in
> the code which loaded the default ruleset directory.
No, not quite. I got rid of data/classic/ directory, and changed ruleset
loading from being specified per file, to being specified per directory.
So now, you'll tell civserver which ruleset directory you want to use, not
give it a list of ruleset files to load. data/default/ is still being
loaded.
> You made one minor change
> to the error messages
>
> - freelog(LOG_ERROR, _("Could not find readable file \"%s\" in data path."),
> + freelog(LOG_NORMAL, _("Could not find readable file \"%s\" in data path."),
> filename);
>
> I don't see why you changed it from error to normal logging, but I trust you
> have your reasons.
The reason is that not finding a datafile on first attempt is not really
an error, and should not be reported as such. For example, if you try to
use the "civ1" modpack, it does not have the cities.ruleset file. So it
will give the above message and load it from the default modpack instead.
This is a feature, not an error.
If you want errors when a datafile is not found, use datafile_required (or
whatever it is called, grep common/shared.c for it). This is the function
which was meant to do that.
> The patch seems good, and it prompts me to say, "Why didn't
> someone else beat you to it?".
It has been a while since anyone changed this part of the code, I think.
Yours,
Per
"What we anticipate seldom occurs: but what we least expect generally
happens." -- Benjamin Disraeli
[Freeciv-Dev] Re: [patch rfd] loading rulesets, Raahul Kumar, 2002/02/22
|
|