Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2001:
[Freeciv-Dev] Re: researchspeed patch

[Freeciv-Dev] Re: researchspeed patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Arien Malec <arien_malec@xxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: researchspeed patch
From: David Pfitzner <dwpfitzner@xxxxxxxxx>
Date: Fri, 23 Mar 2001 20:34:05 -0800 (PST)

Arien Malec <arien_malec@xxxxxxxxx> wrote: 

> It bugged me that game.techlevel was associated with the server
> variable researchspeed, and was associated with the server
> variable techlevel. Attached is a patch that makes researchspeed
> researchspeed. (Of course, one could argue that researchspeed is not a
> good name: researchcostfactor might be more explainatory).

Yeah.  I'd be inclined to change the name, if we can find a shorter
alternative :-)  (If it is changed, is it worth supporting backward
compatability to the old name, for scripts, and for people used to
the current name?)

> The only tricky bit is ensuring that save files with techlevel can be
> loaded in. I put a check on game.version to selectively load in from
> game.researchspeed or game.techlevel. I haven't really tested that,
> however.

This isn't a good way to do it.  Some old code does this, but it 
is deprecated -- see comments up just a bit in game_load().  Instead, 
call section_file_lookup() to see if game.researchspeed is in the file, 
and if not then fall back to looking up game.techlevel.

-- David

Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.

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