Deprecate wesnoth.set_music

This commit is contained in:
Celtic Minstrel 2018-03-17 10:41:04 -04:00
parent 6e4d09d2a5
commit 4b08a40181
2 changed files with 2 additions and 4 deletions

View file

@ -5,9 +5,9 @@
[lua]
code=<<
wesnoth.dofile 'lua/backwards-compatibility.lua'
wesnoth.dofile 'lua/wml-tags.lua'
wesnoth.dofile 'lua/feeding.lua'
wesnoth.dofile 'lua/backwards-compatibility.lua'
>>
[/lua]

View file

@ -2,9 +2,7 @@
-- This file may provide an implementation of Lua functions removed from the engine.
function wesnoth.set_music(cfg)
wesnoth.wml_actions.music(cfg)
end
wesnoth.set_music = wesnoth.deprecate_api('wesnoth.set_music', 'wesnoth.music_list', 1, nil, wesnoth.wml_actions.music)
-- Calling wesnoth.fire isn't the same as calling wesnoth.wml_actions[name] due to the passed vconfig userdata
-- which also provides "constness" of the passed wml object from the point of view of the caller.