mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 23:22:36 +00:00
core.lua: Link to #4584 in a comment near the new warning
This commit is contained in:
parent
74c7c17ec8
commit
4b3a7c0800
@ -202,6 +202,7 @@ function wesnoth.deprecate_api(elem_name, replacement, level, version, elem, det
|
|||||||
-- Don't clobber the old metatable.
|
-- Don't clobber the old metatable.
|
||||||
local old_mt = getmetatable(elem) or {}
|
local old_mt = getmetatable(elem) or {}
|
||||||
if type(old_mt) ~= "table" then
|
if type(old_mt) ~= "table" then
|
||||||
|
-- See https://github.com/wesnoth/wesnoth/issues/4584#issuecomment-555788446
|
||||||
wesnoth.log('warn', "Attempted to deprecate a table with a masked metatable: " ..
|
wesnoth.log('warn', "Attempted to deprecate a table with a masked metatable: " ..
|
||||||
elem_name .. " -> " .. replacement .. ", where getmetatable(" .. elem_name .. ") = " .. tostring(old_mt))
|
elem_name .. " -> " .. replacement .. ", where getmetatable(" .. elem_name .. ") = " .. tostring(old_mt))
|
||||||
return elem
|
return elem
|
||||||
|
Loading…
x
Reference in New Issue
Block a user