Allow matching any wall map terrain in lua scripts
When matching a terrain, allow using a "w" placeholder that matches any solid wall: For example: local s = selection.match([[w.w]]); would match all floor locations with a wall to the left and right of it. The walls can be solid stone, horizontal, vertical, etc. This applies to selection.match(), selection.filter_mapchar(), and des.replace_terrain()
This commit is contained in:
@@ -447,6 +447,7 @@ function test_replace_terrain()
|
||||
des.replace_terrain({ region={1,1, 70,19}, fromterrain=".", toterrain="L", chance=25 });
|
||||
des.replace_terrain({ selection=selection.area(2,5, 10,15), fromterrain="L", toterrain="." });
|
||||
des.replace_terrain({ mapfragment=[[...]], toterrain="T" });
|
||||
des.replace_terrain({ mapfragment=[[w.w]], toterrain="L" });
|
||||
end
|
||||
|
||||
function test_corridor()
|
||||
|
||||
Reference in New Issue
Block a user