Deprecate Add-on.cfg style in favor of Add-on/_main.cfg,
...except for the single-file add-on case.
This commit is contained in:
parent
2af5cd0093
commit
907c0264da
2 changed files with 8 additions and 1 deletions
|
@ -42,6 +42,8 @@ Version 1.9.9+svn:
|
|||
* Add support for [capture_village][filter_side]<SSF>
|
||||
* Added FACING, which adds facing= to a previous [unit] codeblock
|
||||
* Added VARIATION, which adds variation= to a previous [unit] codeblock
|
||||
* Deprecated the Add-on.cfg style in favor of Add-on/_main.cfg, except for
|
||||
the case of a single-file add-on
|
||||
* Miscellaneous and bug fixes:
|
||||
* Fixed compilation on all Debian architectures (Debian bug #636193)
|
||||
* Fixed handling of #ifver and #ifnver preprocessor directives in wmllint
|
||||
|
|
|
@ -1154,8 +1154,13 @@ void game_controller::load_game_cfg(const bool force)
|
|||
// Append the $user_campaign_dir/*.cfg files to addons_to_load.
|
||||
for(std::vector<std::string>::const_iterator uc = user_files.begin(); uc != user_files.end(); ++uc) {
|
||||
const std::string file = *uc;
|
||||
if(file.substr(file.size() - 4, file.size()) == ".cfg")
|
||||
if(file.substr(file.size() - 4, file.size()) == ".cfg") {
|
||||
// Allowing it if the dir doesn't exist, for the single-file add-on.
|
||||
// Turn this into an error later, possibly in 1.11.0
|
||||
if(file_exists(file.substr(0, file.size() - 4)))
|
||||
lg::wml_error << '\'' << file << "' is deprecated, use '" << file.substr(0, file.size()) << "/_main.cfg' instead.\n";
|
||||
addons_to_load.push_back(file);
|
||||
}
|
||||
}
|
||||
|
||||
// Append the $user_campaign_dir/*/_main.cfg files to addons_to_load.
|
||||
|
|
Loading…
Add table
Reference in a new issue