Author: ai0867
Date: Sat Oct 8 15:34:55 2011
New Revision: 51422
URL: http://svn.gna.org/viewcvs/wesnoth?rev=51422&view=rev
Log:
Deprecate Add-on.cfg style in favor of Add-on/_main.cfg, except for the
single-file add-on case.
Modified:
trunk/changelog
trunk/src/game_controller.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=51422&r1=51421&r2=51422&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sat Oct 8 15:34:55 2011
@@ -42,6 +42,8 @@
* 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
Modified: trunk/src/game_controller.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_controller.cpp?rev=51422&r1=51421&r2=51422&view=diff
==============================================================================
--- trunk/src/game_controller.cpp (original)
+++ trunk/src/game_controller.cpp Sat Oct 8 15:34:55 2011
@@ -1154,8 +1154,13 @@
// 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.
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits