Fix Lua deprecation warnings being shown in chat outside debug mode

This commit is contained in:
Celtic Minstrel 2017-05-23 23:54:05 -04:00
parent fdf50bccd1
commit 2fe72820d1

View file

@ -277,10 +277,7 @@ end
function helper.deprecate(msg, f)
return function(...)
if msg then
if wesnoth.game_config.debug then
wesnoth.message("warning", msg)
end
wesnoth.log("warn", msg)
wesnoth.log("warn", msg, wesnoth.game_config.debug)
-- trigger the message only once
msg = nil
end