mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 06:39:37 +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
|
||||||
end
|
end
|
||||||
function has_teleport(u)
|
function has_teleport(u)
|
||||||
local abil = get_child(u.__cfg, "abilities")
|
return wesnoth.unit_ability(u, "teleport")
|
||||||
return abil and get_child(abil, "teleport")
|
|
||||||
end
|
end
|
||||||
>>
|
>>
|
||||||
[/lua]
|
[/lua]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user