fixup! lua: Simplify the __index and __newindex wrappers in wesnoth.deprecate_api

This commit is contained in:
josteph 2019-12-14 14:14:12 +00:00
parent 3ea5ee5f70
commit 1df045fba0

View file

@ -216,7 +216,7 @@ function wesnoth.deprecate_api(elem_name, replacement, level, version, elem, det
msg_shown = true
wesnoth.deprecated_message(elem_name, level, version, message)
end
return elem[val]
return elem[key]
end
mt.__newindex = function(self, key, val)
if not msg_shown then