From 1a1a893a4cabbe9e932024df65afd4f9717af58d Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sun, 12 Mar 2017 21:51:37 -0400 Subject: [PATCH] Update [heal_unit] to use new animation API calls --- data/lua/wml-tags.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/data/lua/wml-tags.lua b/data/lua/wml-tags.lua index 851d193453d..3f9458beb49 100644 --- a/data/lua/wml-tags.lua +++ b/data/lua/wml-tags.lua @@ -688,11 +688,12 @@ function wml_actions.heal_unit(cfg) end if cfg.animate then - -- TODO: Make this use the new animation API - wesnoth.animate_unit{ - T.filter(healers), - flag = "healing" - } + if #healers then + local animator = wesnoth.create_animator() + -- Need dummy 3rd argument here... + animator:add(healers[1], 'healing', 'hits') + animator:run() + end end end end