From 571014f374e6e7d8767ac93736bbeb494fbe5488 Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Mon, 21 Dec 2015 23:32:47 +0100 Subject: [PATCH] remove undocumented [wml_action] tag there is no reason to use this when lua code can easily add a function to wesnoth.wml_actions directly. --- data/lua/wml-tags.lua | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/data/lua/wml-tags.lua b/data/lua/wml-tags.lua index c2497b79304..5954864db85 100644 --- a/data/lua/wml-tags.lua +++ b/data/lua/wml-tags.lua @@ -249,22 +249,6 @@ function wml_actions.unit_worth(cfg) wesnoth.set_variable("unit_worth", math.floor(math.max(ut.cost * hp, best_adv * xp))) end -function wml_actions.wml_action(cfg) - -- The new tag's name - local name = cfg.name or - helper.wml_error "[wml_action] missing required name= attribute." - local code = cfg.lua_function or - helper.wml_error "[wml_action] missing required lua_function= attribute." - local bytecode, message = load(code) - if not bytecode then - helper.wml_error("[wml_action] failed to compile Lua code: " .. message) - end - -- The lua function that is executed when the tag is called - local lua_function = bytecode() or - helper.wml_error "[wml_action] expects a Lua code returning a function." - wml_actions[name] = lua_function -end - function wml_actions.lua(cfg) local cfg = helper.shallow_literal(cfg) local bytecode, message = load(cfg.code or "")