Lua API: Use a named tuple when converting a location set to triples

This commit is contained in:
Celtic Minstrel 2021-07-26 09:55:14 -04:00 committed by Celtic Minstrel
parent 7d7b58e31e
commit c59c3b9273

View File

@ -324,7 +324,9 @@ end
function methods:to_triples()
local res = {}
self:iter(function(x, y, v) table.insert(res, { x, y, v }) end)
self:iter(function(x, y, v)
table.insert(res, wesnoth.named_tuple({ x, y, v }, {"x", "y", "value"}))
end)
return res
end