Allowed a comma separated id list for [remove_event] and [event] remove=yes

This commit is contained in:
Charles Dang 2014-12-28 20:31:45 +11:00
parent ec985105ef
commit 95c94bc192

View file

@ -1396,9 +1396,8 @@ function wml_actions.endlevel(cfg)
end
function wml_actions.event(cfg)
local remove = cfg.remove
if remove then
wesnoth.remove_event_handler(cfg.id)
if cfg.remove then
wml_actions.remove_event(cfg)
else
wesnoth.add_event_handler(cfg)
end
@ -1407,7 +1406,9 @@ end
function wml_actions.remove_event(cfg)
local id = cfg.id or helper.wml_error("[remove_event] missing required id= key")
wesnoth.remove_event_handler(id)
for w in split(id) do
wesnoth.remove_event_handler(w)
end
end
function wml_actions.inspect(cfg)