From: Stefan F. <ste...@we...> - 2012-01-09 11:11:09
|
Answering an older mail: see answer at the bottom. On Tuesday, December 27, 2011 09:50:31 pm Erik Vos wrote: > > From: Frederick Weld [mailto:fre...@go...] > > > > Fixed retrieval of default game options (if options pane was not > > opened) > > > Game options have to be read from GamesList.xml and not from the > > respective game's Games.xml GameOption tags. > > Before the fix, this was not the case if the options pane had not > > been opened (which is the moment at which the GamesList's default > > options were loaded). > > > > This fix also solves Bug 3448429, as the reported missing 18EU route > > calculation was due to inconsistent defaulting between GamesList > > (default=suggest) and Games (default=deactivate). Now, the defaults > > are always taken from GamesList. > > I vaguely remember that Stefan had a good reason why it was implemented > with different defaults. > Or was that only for backward compatibility at some point? > > Erik. Yes there is a valid distinction between those too and there is a use case for the difference: The GameList.xml "default" defines the attributes at the GameStart (thus it is the default option shown in the start UI). The Game.xml "default" is/was ONLY used if the option is not defined in a Rails save file: Thus for those cases where a save file was saved with a previous Rails version which do not feature that option. The use case is now for those options which have a default defined which is incompatible to the behavior defined (implicitly) in the previous Rails version: There have been several examples, one is the revenue calculation (which is a default for new games, but not automatically turned on for existing games) and all those options which made Rails enforcing stricter rules (or add automatic passes) which might have broke previous save files. I did not implement that part of Rails and my guess was that this was not really intended: It seems that this behavior got forgotten during the refactoring of the xml parsing. I always intended to merge the two lists and instead use attribute default="...." always and undefined="..." only for those cases where there is a reason to deviate. But that could/should wait until Rails 2.0 Stefan |