Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add deprecation messages to aspects

[target], [protect_unit], [protect_location],
protect_leader=, protect_leader_radius=.
Patch by pl_kolek. See https://gna.org/patch/?3884
  • Loading branch information...
commit 8c91d2e5cb69bc1f929e7ae705a007b09615df75 1 parent db2f046
@flixx flixx authored
Showing with 11 additions and 0 deletions.
  1. +2 −0  changelog
  2. +3 −0  data/core/about.cfg
  3. +6 −0 src/ai/configuration.cpp
View
2  changelog
@@ -45,6 +45,8 @@ Version 1.11.4+dev:
using ~CROP() with negative coordinates.
* Fixed abilities sometimes affecting self during movement even when they are
flagged as not affecting self (bug #20755).
+ * Added deprecation messages to aspects [target], [protect_unit], [protect_location],
+ protect_leader=, protect_leader_radius=
* Miscellaneous and bug fixes
* Fixed minor issue with Drake Clasher animations
* Added a new playlist FULL_MUSIC_PLAYLIST, which contains all Wesnoth tracks
View
3  data/core/about.cfg
@@ -1113,6 +1113,9 @@
comment = "2012 Google Code-in Students' Micro AI development"
[/entry]
[entry]
+ name = "Mateusz Kolaczek (PL_kolek)"
+ [/entry]
+ [entry]
name = "Matthias Schoeck (mattsc)"
comment = "AI improvements"
[/entry]
View
6 src/ai/configuration.cpp
@@ -25,6 +25,7 @@
#include "../serialization/parser.hpp"
#include "../serialization/preprocessor.hpp"
#include "../team.hpp"
+#include "wml_exception.hpp"
#include <boost/foreach.hpp>
@@ -399,6 +400,7 @@ bool configuration::upgrade_side_config_from_1_07_02_to_1_07_03(side_number side
BOOST_FOREACH(const config &aitarget, aiparam.child_range("target")) {
+ lg::wml_error << deprecate_wml_key_warning("target", "1.12.0") << "\n";
config aigoal;
transfer_turns_and_time_of_day_data(aiparam,aigoal);
@@ -417,6 +419,7 @@ bool configuration::upgrade_side_config_from_1_07_02_to_1_07_03(side_number side
BOOST_FOREACH(config &ai_protect_unit, aiparam.child_range("protect_unit")) {
+ lg::wml_error << deprecate_wml_key_warning("protect_unit", "1.12.0") << "\n";
transfer_turns_and_time_of_day_data(aiparam,ai_protect_unit);
upgrade_protect_goal_config_from_1_07_02_to_1_07_03(side,ai_protect_unit,parsed_cfg,true);
}
@@ -424,6 +427,7 @@ bool configuration::upgrade_side_config_from_1_07_02_to_1_07_03(side_number side
BOOST_FOREACH(config &ai_protect_location, aiparam.child_range("protect_location")) {
+ lg::wml_error << deprecate_wml_key_warning("protect_location", "1.12.0") << "\n";
transfer_turns_and_time_of_day_data(aiparam,ai_protect_location);
upgrade_protect_goal_config_from_1_07_02_to_1_07_03(side,ai_protect_location,parsed_cfg,false);
}
@@ -432,12 +436,14 @@ bool configuration::upgrade_side_config_from_1_07_02_to_1_07_03(side_number side
if (const config::attribute_value *v = aiparam.get("protect_leader"))
{
+ lg::wml_error << deprecate_wml_key_warning("protect_leader", "1.12.0") << "\n";
config c;
c["value"] = *v;
c["canrecruit"] = true;
c["side_number"] = side;
transfer_turns_and_time_of_day_data(aiparam,c);
if (const config::attribute_value *v = aiparam.get("protect_leader_radius")) {
+ lg::wml_error << deprecate_wml_key_warning("protect_leader_radius", "1.12.0") << "\n";
c["radius"] = *v;
}
Please sign in to comment.
Something went wrong with that request. Please try again.