Skip to content

Commit

Permalink
Lua: Rename wesnoth.map_location -> wesnoth.map
Browse files Browse the repository at this point in the history
Eventually, game_lua_kernel will add additional stuff to this table.
  • Loading branch information
CelticMinstrel committed May 4, 2017
1 parent 4797040 commit a15e637
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions data/lua/wml/animate_unit.lua
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/scripting/lua_kernel_base.cpp
Expand Up @@ -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 },
Expand All @@ -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
Expand Down

0 comments on commit a15e637

Please sign in to comment.