From 767d0a24c0e8e10b673f35b78025e5042b96d2aa Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sat, 20 Feb 2021 00:46:02 -0500 Subject: [PATCH] Rename two functions for consistency of terminology --- data/lua/core/map.lua | 3 +++ src/scripting/lua_kernel_base.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/data/lua/core/map.lua b/data/lua/core/map.lua index d8d5c99b44d37..fe95ab96c89f7 100644 --- a/data/lua/core/map.lua +++ b/data/lua/core/map.lua @@ -135,3 +135,6 @@ if wesnoth.kernel_type() == "Mapgen Lua Kernel" then return wesnoth.map.find_in_radius(map, locs, radius, filter) end, 'The filter is now the last parameter, instead of the radius') end + +wesnoth.map.tiles_adjacent = wesnoth.deprecate_api('wesnoth.map.tiles_adjacent', 'wesnoth.map.are_hexes_adjacent', 1, nil, wesnoth.map.are_hexes_adjacent) +wesnoth.map.get_adjacent_tiles = wesnoth.deprecate_api('wesnoth.map.get_adjacent_tiles', 'wesnoth.map.get_adjacent_hexes', 1, nil, wesnoth.map.get_adjacent_hexes) diff --git a/src/scripting/lua_kernel_base.cpp b/src/scripting/lua_kernel_base.cpp index 19781ada1489d..23847210655d6 100644 --- a/src/scripting/lua_kernel_base.cpp +++ b/src/scripting/lua_kernel_base.cpp @@ -544,8 +544,8 @@ lua_kernel_base::lua_kernel_base() { "vector_diff", &lua_map_location::intf_vector_diff }, { "vector_negation", &lua_map_location::intf_vector_negation }, { "rotate_right_around_center", &lua_map_location::intf_rotate_right_around_center }, - { "tiles_adjacent", &lua_map_location::intf_tiles_adjacent }, - { "get_adjacent_tiles", &lua_map_location::intf_get_adjacent_tiles }, + { "are_hexes_adjacent", &lua_map_location::intf_tiles_adjacent }, + { "get_adjacent_hexes", &lua_map_location::intf_get_adjacent_tiles }, { "distance_between", &lua_map_location::intf_distance_between }, { "get_in_basis_N_NE", &lua_map_location::intf_get_in_basis_N_NE }, { "get_relative_dir", &lua_map_location::intf_get_relative_dir },