Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [patch rfd] loading rulesets
Home

[Freeciv-Dev] Re: [patch rfd] loading rulesets

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [patch rfd] loading rulesets
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Fri, 22 Feb 2002 06:07:14 -0800 (PST)

--- "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx> wrote:
> 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 :)

I don't know what the set techs features does. I'd like to know what people
were originally using them for. It seems useless to me too, but clearly someone
out there thought it was necessary.

> > 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.

My mistake. By default directory, I meant you got rid of lines referring to
classic.

> > 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.

I see. 

> 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.
> 

Not a chance. It's the first time I've looked at the game saving/loading code
in  a year. It's just never seemed that exciting. If you hadn't mentioned the
dramatic savings in size I would have probably ignored the post.

> > 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
> 

Bye,
Raahul.

It is well known that *things* from undesirable universes are always seeking an
entrance into this one, which is the psychic equivalent of handy for the buses
and closer to the shops. -Terry Pratchett, "The Light Fantastic"


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com


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