Fix Lua deprecation warnings being shown in chat outside debug mode
This commit is contained in:
parent
fdf50bccd1
commit
2fe72820d1
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue