[Lua.MapGen] Add wesnoth.map.filter_tags.formula that takes a WFL formula to match against locations

This commit is contained in:
Celtic Minstrel 2024-02-06 21:38:35 -05:00 committed by Celtic Minstrel
parent 5ed7f63ede
commit ab008161f1

View file

@ -415,7 +415,13 @@ if wesnoth.kernel_type() == "Mapgen Lua Kernel" then
---@return terrain_filter_tag
is_loc = function(loc)
return f.all(f.x(loc[1]), f.y(loc[2]))
end
end,
---Match terrain by Wesnoth Formula Language
---@param formula string|formula
---@return terrain_filter_tag
formula = function(formula)
return { "formula", formula }
end,
}
-- More map module stuff