From 8a3572a62ba9d74f8ac975b4c6dcaaa88a010ce0 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Fri, 26 Dec 2014 22:33:09 +1100 Subject: [PATCH] Added [remove_event] (equivalent to [event] id= remove=yes) --- data/lua/wml-tags.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/lua/wml-tags.lua b/data/lua/wml-tags.lua index 6f8a53504291..aebba3cf18e6 100644 --- a/data/lua/wml-tags.lua +++ b/data/lua/wml-tags.lua @@ -1401,6 +1401,12 @@ function wml_actions.event(cfg) end 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) +end + function wml_actions.inspect(cfg) wesnoth.gamestate_inspector(cfg) end