[Lua.MapGen] Accept both comma-separated lists and arrays for f.adjacent

This commit is contained in:
Celtic Minstrel 2024-02-04 14:42:04 -05:00 committed by Celtic Minstrel
parent 19f3682bdf
commit a9948d3fff

View file

@ -381,6 +381,9 @@ if wesnoth.kernel_type() == "Mapgen Lua Kernel" then
---@param count? integer|string A range list
---@return terrain_filter_tag
adjacent = function(f, adj, count)
if type(adj) == 'table' then
adj = stringx.join(',', adj)
end
return { "adjacent", f, adjacent = adj, count = count }
end,
---Match hexes from a separate list.