Add a deprecation message for something that has been deprecated since at least 1.14

This commit is contained in:
Celtic Minstrel 2021-07-31 23:45:21 -04:00 committed by Celtic Minstrel
parent ed746b523e
commit b2ef8cad89

View file

@ -35,6 +35,8 @@
#include "scripting/game_lua_kernel.hpp"
#include "units/unit.hpp"
#include "units/map.hpp"
#include "deprecation.hpp"
#include "game_version.hpp"
namespace ai {
@ -130,6 +132,7 @@ public:
: lua_candidate_action_wrapper_base(context,cfg), location_(cfg["location"]), use_parms_(false)
{
if (cfg.has_attribute("exec_parms") || cfg.has_attribute("eval_parms")) {
deprecated_message("[candidate_action]eval_parms,exec_parms=", DEP_LEVEL::PREEMPTIVE, "1.17", "Use [args] instead - this data is passed to both the evaluation and the execution");
use_parms_ = true;
exec_parms_ = cfg["exec_parms"].str();
eval_parms_ = cfg["eval_parms"].str();