Move the deprecation for wesnoth.modify_ai to Lua so that it honours --strict-lua
This commit is contained in:
parent
9bf189a615
commit
603ecdfb99
2 changed files with 1 additions and 1 deletions
|
@ -44,4 +44,5 @@ if wesnoth.kernel_type() == "Game Lua Kernel" then
|
|||
wesnoth.change_ai_component = wesnoth.deprecate_api('wesnoth.change_ai_component', 'wesnoth.sides.change_ai_component', 1, nil, wesnoth.sides.change_ai_component)
|
||||
wesnoth.get_sides = wesnoth.deprecate_api('wesnoth.get_sides', 'wesnoth.sides.find', 1, nil, wesnoth.sides.find)
|
||||
wesnoth.create_side = wesnoth.deprecate_api('wesnoth.create_side', 'wesnoth.sides.create', 1, nil, wesnoth.sides.create)
|
||||
wesnoth.modify_ai = wesnoth.deprecate_api('wesnoth.modify_ai', 'wesnoth.sides.add|delete|change_ai_component', 1, nil, wesnoth.modify_ai)
|
||||
end
|
|
@ -3355,7 +3355,6 @@ static int intf_modify_ai_old(lua_State *L)
|
|||
config cfg;
|
||||
luaW_toconfig(L, 1, cfg);
|
||||
int side = cfg["side"];
|
||||
deprecated_message("wesnoth.modify_ai", DEP_LEVEL::PREEMPTIVE, {1, 15, 0}, "Use wesnoth.sides.add_ai_component, wesnoth.sides.delete_ai_component, or wesnoth.sides.change_ai_component.");
|
||||
ai::manager::get_singleton().modify_active_ai_for_side(side, cfg);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue