From 9f0c677d02c89a81cc960f9277a0bc40f1a5805e Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Mon, 22 May 2017 17:10:51 -0400 Subject: [PATCH] Remove the optional second argument to wesnoth.get_variable It was only used in one place and didn't even function as advertised. --- data/lua/core.lua | 2 +- src/scripting/lua_common.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/data/lua/core.lua b/data/lua/core.lua index e51e59468de5..68ffc4c9890d 100644 --- a/data/lua/core.lua +++ b/data/lua/core.lua @@ -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 diff --git a/src/scripting/lua_common.cpp b/src/scripting/lua_common.cpp index 614affa9ac4e..2bcf517fb2fc 100644 --- a/src/scripting/lua_common.cpp +++ b/src/scripting/lua_common.cpp @@ -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