[Lua.MapGen] Add wesnoth.map.filter_tags.formula that takes a WFL formula to match against locations
This commit is contained in:
parent
5ed7f63ede
commit
ab008161f1
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue