Skip to content

Commit

Permalink
Fix Lua deprecation warnings being shown in chat outside debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed May 24, 2017
1 parent fdf50bc commit 2fe7282
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions data/lua/helper.lua
Expand Up @@ -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
Expand Down

0 comments on commit 2fe7282

Please sign in to comment.