13 Commits

Author SHA1 Message Date
Celtic Minstrel
aaa2dc4ece Rollback possibility of wesnoth.get_units matching recall list units
Now it's renamed to wesnoth.units.find_on_map.

wesnoth.units.find implements the case of finding units on either the map or a recall list.
2019-11-15 22:39:09 -05:00
Celtic Minstrel
977f05d77f Lua: Replace uses of deprecated (moved) unit functions
Also backtracked the removal of wesnoth.get_recall_units, which is now available as wesnoth.units.find_on_recall - it's just more convenient than passing x=recall to wesnoth.units.find
2019-11-15 22:39:08 -05:00
newfrenchy83
c1a70068d5 Lua API: implicitly clear animator after playing it (#3536)
This prevents the animator from holding a strong reference to the target unit, which was keeping the unit object alive and thus preventing the unit halo, if any, from disappearing.

(cherry-picked from commit 7d6e2b2a10a61e1704c38ea7ee6aa34178a29b38)
2018-10-07 03:24:59 +00:00
newfrenchy83
98bec00fac [heal_unit]: clear the animation after playing it (#3526)
Fixes another case of unit halo remaining after death.

(cherry-picked from commit 354162919741f1b5360120286bf389ecd963be79)
2018-10-07 03:24:56 +00:00
mattsc
0e017d9f7c Lua code: replace deprecated wesnoth.set_variable() calls
(cherry-picked from commit ce7faae4f41f23f1d1f61d2b4f5ca95d4ce4f89a)
2018-10-07 03:21:07 +00:00
Jyrki Vesterinen
d75a752c06 [heal_unit]: ensure that heal amount is an integer
(cherry-picked from commit 76ed49a45f3679050cf06e2ab6aa5ec072957572)
2018-10-07 03:19:22 +00:00
Jyrki Vesterinen
167ee61d34 Revert "Display amount healed as an integer in [heal_unit]"
This reverts commit 0294bd81b21be27e09f10d812fafa6bae7090002.

Changing display is unnecessary when the healed amount itself is forced
to be an integer (next commit).

(cherry-picked from commit f2284e2e79db5432039d0ac0a364d0982c7f9f71)
2018-10-07 03:19:22 +00:00
Celtic Minstrel
017c3ca9cf Display amount healed as an integer in [heal_unit]
(cherry-picked from commit 0294bd81b21be27e09f10d812fafa6bae7090002)
2018-10-07 03:19:21 +00:00
Charles Dang
0103959c36 Cleaned up deprecated API usage in core Lua
[ci skip]
2018-03-13 16:55:36 +11:00
Charles Dang
3489dac642 [heal_unit]: don't play healed animation if no healing is done
[ci skip]

Addresses #2530. Not closing that though, since the behavior might still be tweaked.

The healer will still play their own animation, if applicable (behavior option 2 in
the bug report).
2018-03-05 15:44:42 +11:00
Jyrki Vesterinen
f064f50f1b [heal_unit]: Turn on floating text with animate=yes
I also moved the animation to be played *before* healing, which is the same
order as in C++ code. In the previous order, the animation isn't played for
some reason.

Fixes #2295.
2017-12-18 23:28:45 +02:00
Jyrki Vesterinen
d80d47eb8a [heal_unit]: fix wrong value of "hits" parameter
Only "hit", "miss" and "kill" are allowed.
2017-12-18 22:04:35 +02:00
Celtic Minstrel
e1233fd0f2 Split several of the larger WML tags into their own file 2017-05-03 02:43:22 -04:00