[Freeciv-Dev] Re: researchspeed patch
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Arien Malec <arien_malec@xxxxxxxxx> wrote:
> It bugged me that game.techlevel was associated with the server
> variable researchspeed, and game.tech 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,
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.
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.