Fix some incorrect deprecation messages
This commit is contained in:
parent
80b3809b9b
commit
45625b0cf5
2 changed files with 4 additions and 4 deletions
|
@ -1759,7 +1759,7 @@ int game_lua_kernel::intf_find_path(lua_State *L)
|
|||
// If there's a unit, we have a valid side, so fall back to legacy behaviour.
|
||||
// If we don't have a unit, legacy behaviour would be a crash, so let's not.
|
||||
if(u) see_all = true;
|
||||
deprecated_message("wesnoth.find_path with viewing_side=0 (or an invalid side)", DEP_LEVEL::FOR_REMOVAL, {1, 17, 0}, "To consider fogged and hidden units, use ignore_visibility=true instead.");
|
||||
deprecated_message("wesnoth.paths.find_path with viewing_side=0 (or an invalid side)", DEP_LEVEL::FOR_REMOVAL, {1, 17, 0}, "To consider fogged and hidden units, use ignore_visibility=true instead.");
|
||||
}
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
@ -1773,7 +1773,7 @@ int game_lua_kernel::intf_find_path(lua_State *L)
|
|||
}
|
||||
else if (lua_isfunction(L, arg))
|
||||
{
|
||||
deprecated_message("wesnoth.find_path with cost_function as last argument", DEP_LEVEL::FOR_REMOVAL, {1, 17, 0}, "Use calculate=cost_function inside the path options table instead.");
|
||||
deprecated_message("wesnoth.paths.find_path with cost_function as last argument", DEP_LEVEL::FOR_REMOVAL, {1, 17, 0}, "Use calculate=cost_function inside the path options table instead.");
|
||||
calc.reset(new lua_pathfind_cost_calculator(L, arg));
|
||||
}
|
||||
|
||||
|
@ -1781,7 +1781,7 @@ int game_lua_kernel::intf_find_path(lua_State *L)
|
|||
|
||||
if(!ignore_teleport) {
|
||||
if(viewing_side == 0) {
|
||||
return luaL_error(L, "wesnoth.find_path: ignore_teleport=false requires a valid viewing_side");
|
||||
return luaL_error(L, "wesnoth.paths.find_path: ignore_teleport=false requires a valid viewing_side");
|
||||
} else {
|
||||
teleport_locations = pathfind::get_teleport_locations(*u, board().get_team(viewing_side), see_all, ignore_units);
|
||||
}
|
||||
|
|
|
@ -954,7 +954,7 @@ int lua_kernel_base::impl_game_config_get(lua_State* L)
|
|||
return_int_attrib("recall_cost", game_config::recall_cost);
|
||||
return_int_attrib("kill_experience", game_config::kill_experience);
|
||||
return_int_attrib("combat_experience", game_config::combat_experience);
|
||||
return_string_attrib_deprecated("version", "wesnoth.game_config", INDEFINITE, "1.17", "Use version.current() instead", game_config::wesnoth_version.str());
|
||||
return_string_attrib_deprecated("version", "wesnoth.game_config", INDEFINITE, "1.17", "Use wesnoth.current_version() instead", game_config::wesnoth_version.str());
|
||||
return_bool_attrib("debug", game_config::debug);
|
||||
return_bool_attrib("debug_lua", game_config::debug_lua);
|
||||
return_bool_attrib("strict_lua", game_config::strict_lua);
|
||||
|
|
Loading…
Add table
Reference in a new issue