Fix broken global_vars table
This commit is contained in:
parent
49bc5cc6db
commit
1122ed00fb
1 changed files with 7 additions and 1 deletions
|
@ -371,8 +371,14 @@ if wesnoth.kernel_type() ~= "Application Lua Kernel" then
|
|||
local ns_key, global_temp = '$ns$', "lua_global_variable"
|
||||
local global_vars_ns = {}
|
||||
local global_vars_mt = {
|
||||
__metatable = 'global variables',
|
||||
__index = function(self, namespace)
|
||||
setmetatable({[ns_key] = namespace}, global_vars_ns)
|
||||
local ns = setmetatable({
|
||||
__metatable = string.format('global variables[%s]', namespace)
|
||||
}, {
|
||||
__index = global_vars_ns
|
||||
})
|
||||
return setmetatable({[ns_key] = namespace}, ns)
|
||||
end
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue