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
This commit is contained in:
parent
db2f04636f
commit
8c91d2e5cb
3 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -1112,6 +1112,9 @@
|
|||
name = "Martin Bede"
|
||||
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"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue