[remove_sound_source] now accepts a comma-separated ID list

[ci skip]

Lack of this pointed out by @shikadiqueen.
This change will also throw an error if id= is missing. Not sure if it did so before.

(cherry-picked from commit 8d3f54ce7c)
This commit is contained in:
Charles Dang 2018-05-22 14:52:39 +11:00
parent 56cba5aacf
commit f68aec177f
2 changed files with 5 additions and 1 deletions

View file

@ -133,6 +133,7 @@
* Fixed [modify_side] share_vision=yes not doing anything (bug #2850).
* Support male_voice and female_voice in [message]
* Support [break], [continue], and [return] in [random_placement]
* [remove_sound_source] now accepts a comma-separated ID list
### Miscellaneous and bug fixes
* Fixed minimap buttons not doing anything (bug #2681)
* Fixed some hotkeys triggering multiple commands on GNU/Linux (bug #1736)

View file

@ -877,7 +877,10 @@ wml_actions.teleport = function(cfg)
end
function wml_actions.remove_sound_source(cfg)
wesnoth.remove_sound_source(cfg.id)
local ids = cfg.id or helper.wml_error("[remove_sound_source] missing required id= attribute")
for id in utils.split(ids) do
wesnoth.remove_sound_source(id)
end
end
function wml_actions.sound_source(cfg)