Skip to content

Commit

Permalink
Remove the optional second argument to wesnoth.get_variable
Browse files Browse the repository at this point in the history
It was only used in one place and didn't even function as advertised.
  • Loading branch information
CelticMinstrel committed May 22, 2017
1 parent c67d524 commit 9f0c677
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data/lua/core.lua
Expand Up @@ -158,7 +158,7 @@ local variable_mt = {
}

local function get_variable_proxy(k)
local v = wesnoth.get_variable(k, true)
local v = wesnoth.get_variable(k)
if type(v) == "table" then
v = setmetatable({ __varname = k }, variable_mt)
end
Expand Down
3 changes: 1 addition & 2 deletions src/scripting/lua_common.cpp
Expand Up @@ -861,8 +861,7 @@ bool luaW_pushvariable(lua_State *L, variable_access_const& v)
else if(v.exists_as_container())
{
lua_newtable(L);
if (luaW_toboolean(L, 2))
luaW_filltable(L, v.as_container());
luaW_filltable(L, v.as_container());
return true;
}
else
Expand Down

0 comments on commit 9f0c677

Please sign in to comment.