diff --git a/data/lua/wml/animate_unit.lua b/data/lua/wml/animate_unit.lua index 466286dd2c3c..31521403fbb7 100644 --- a/data/lua/wml/animate_unit.lua +++ b/data/lua/wml/animate_unit.lua @@ -77,9 +77,9 @@ local function add_animation(anim, cfg) if facing then local facing_loc = wesnoth.get_locations(facing)[1] if facing_loc then - local dir = wesnoth.map_location.get_relative_dir(unit.x, unit.y, facing_loc[1], facing_loc[2]) + local dir = wesnoth.map.get_relative_dir(unit.x, unit.y, facing_loc[1], facing_loc[2]) unit.facing = dir - facing = wesnoth.map_location.get_direction(unit.x, unit.y, dir) + facing = wesnoth.map.get_direction(unit.x, unit.y, dir) else facing = nil end diff --git a/src/scripting/lua_kernel_base.cpp b/src/scripting/lua_kernel_base.cpp index 60f194ece8a1..2b345919e6e9 100644 --- a/src/scripting/lua_kernel_base.cpp +++ b/src/scripting/lua_kernel_base.cpp @@ -412,7 +412,7 @@ lua_kernel_base::lua_kernel_base() lua_pop(L, 1); // Get some callbacks for map locations - cmd_log_ << "Adding map_location table...\n"; + cmd_log_ << "Adding map table...\n"; static luaL_Reg const map_callbacks[] { { "get_direction", &lua_map_location::intf_get_direction }, @@ -432,7 +432,7 @@ lua_kernel_base::lua_kernel_base() lua_getglobal(L, "wesnoth"); lua_newtable(L); luaL_setfuncs(L, map_callbacks, 0); - lua_setfield(L, -2, "map_location"); + lua_setfield(L, -2, "map"); lua_pop(L, 1); // Add mersenne twister rng wrapper