mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 15:14:16 +00:00
Add deprecated warnings for [advance]
This commit is contained in:
parent
f0c051d688
commit
ad62e1d4fd
@ -3278,6 +3278,7 @@ static int intf_add_modification(lua_State *L)
|
||||
std::string sm = m;
|
||||
if (sm == "advance") { // Maintain backwards compatibility
|
||||
sm = "advancement";
|
||||
lg::wml_error << "(Lua) Modifications of type \"advance\" are deprecated, use \"advancement\" instead\n";
|
||||
}
|
||||
if (sm != "advancement" && sm != "object" && sm != "trait") {
|
||||
return luaL_argerror(L, 2, "unknown modification type");
|
||||
|
@ -2069,6 +2069,9 @@ void unit::apply_modifications()
|
||||
|
||||
for(size_t i = 0; i != NumModificationTypes; ++i) {
|
||||
const std::string& mod = ModificationTypes[i];
|
||||
if(mod == "advance" && modifications_.has_child(mod)) {
|
||||
lg::wml_error << "[modifications][advance] is deprecated, use [advancement] instead\n";
|
||||
}
|
||||
BOOST_FOREACH(const config &m, modifications_.child_range(mod)) {
|
||||
log_scope("add mod");
|
||||
add_modification(ModificationTypes[i], m, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user