Show Lua deprecation warnings to chat only in debug mode, but always log them too
This commit is contained in:
parent
8492e8d639
commit
30caf6149a
1 changed files with 4 additions and 1 deletions
|
@ -277,7 +277,10 @@ end
|
|||
function helper.deprecate(msg, f)
|
||||
return function(...)
|
||||
if msg then
|
||||
wesnoth.message("warning", msg)
|
||||
if not message_shown and wesnoth.game_config.debug then
|
||||
wesnoth.message("warning", msg)
|
||||
end
|
||||
wesnoth.log("warn", msg)
|
||||
-- trigger the message only once
|
||||
msg = nil
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue