mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-17 19:28:57 +00:00
Added test for ability getter.
This commit is contained in:
parent
586cbddae1
commit
7c096e854a
@ -405,8 +405,7 @@ wesnoth.message(string.format("Button %d pressed. Item %d selected.",
|
||||
end
|
||||
end
|
||||
function has_teleport(u)
|
||||
local abil = get_child(u.__cfg, "abilities")
|
||||
return abil and get_child(abil, "teleport")
|
||||
return wesnoth.unit_ability(u, "teleport")
|
||||
end
|
||||
>>
|
||||
[/lua]
|
||||
|
Loading…
x
Reference in New Issue
Block a user