Added deprecation warning for [campaign] difficulties,difficulty_descriptions=

This commit is contained in:
Charles Dang 2015-12-16 23:32:18 +11:00
parent 3c091dbe7d
commit 6b82b0dace

View file

@ -31,6 +31,11 @@
#include "gui/widgets/window.hpp"
#include "utils/foreach.tpp"
#include "log.hpp"
static lg::log_domain log_wml("wml");
#define WRN_WML LOG_STREAM(warn, log_wml)
namespace gui2
{
@ -82,6 +87,8 @@ tcampaign_difficulty::tcampaign_difficulty(
// Convert legacy format to new-style config if latter not present
if(difficulties_.empty()) {
WRN_WML << "[campaign] difficulties,difficulty_descriptions= is deprecated. Use [difficulty] instead" << std::endl;
if(difficulty_opts.size() != difficulty_list.size()) {
difficulty_opts = difficulty_list;
}